r203094 - [-Wunreachable-code] Refine treating all branches of 'switch' as reachable, which includes those with all cases covered but with no 'default:'.

2014-03-06 Thread Ted Kremenek
Author: kremenek Date: Thu Mar 6 02:09:00 2014 New Revision: 203094 URL: http://llvm.org/viewvc/llvm-project?rev=203094view=rev Log: [-Wunreachable-code] Refine treating all branches of 'switch' as reachable, which includes those with all cases covered but with no 'default:'. Modified:

Re: [PATCH] Add an argument comment checker to clang-tidy.

2014-03-06 Thread Peter Collingbourne
Address review comments. Hi alexfh, http://llvm-reviews.chandlerc.com/D2914 CHANGE SINCE LAST DIFF http://llvm-reviews.chandlerc.com/D2914?vs=7453id=7584#toc Files: clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MiscTidyModule.h test/clang-tidy/arg-comments.cpp Index:

Re: [PATCH] Add an argument comment checker to clang-tidy.

2014-03-06 Thread Peter Collingbourne
Try running only your check (clang-tidy -checks=your check name). This way you don't get rid of compiler warnings (yet), but they shouldn't appear in clang-tidy if your build is clean. Sorry, I meant that I received benign warnings from my checker as a result of analyzing code in the AST

[PATCH] [OPENMP] OMPExecutableDirective re-factoring

2014-03-06 Thread Alexander Musman
Hi rsmith, doug.gregor, ABataev, gribozavr, hfinkel, cbergstrom, fraggamuffin, This patch is a simple re-factoring of OMPExecutableDirective. The change is to store the number of tail-allocated clauses and children and dynamically compute their locations.

[clang-tools-extra] r203097 - Use more specific checks filter in the test.

2014-03-06 Thread Alexander Kornienko
Author: alexfh Date: Thu Mar 6 02:31:03 2014 New Revision: 203097 URL: http://llvm.org/viewvc/llvm-project?rev=203097view=rev Log: Use more specific checks filter in the test. Modified: clang-tools-extra/trunk/test/clang-tidy/select-checks.cpp Modified:

Re: [PATCH] Delete various dead assignments

2014-03-06 Thread Gautier DI FOLCO
2014-03-03 14:29 GMT+01:00 Gautier DI FOLCO gautier.difo...@gmail.com: I have tested it with a newer revision and I have kept the curly brackets. http://llvm-reviews.chandlerc.com/D2882 CHANGE SINCE LAST DIFF http://llvm-reviews.chandlerc.com/D2882?vs=7360id=7472#toc Files:

Re: [PATCH] Add an argument comment checker to clang-tidy.

2014-03-06 Thread Alexander Kornienko
Comment at: clang-tidy/misc/MiscTidyModule.h:1 @@ +1,2 @@ +//===--- MiscTidyModule.h - clang-tidy --*- C++ -*-===// +// I'd make a .h + .cpp file per check instead of using a single header for all checks. Comment at:

Re: [libcxx] r202994 - Implement LWG 2193. Default constructors for standard library containers are explicit. Note that libc++ already did this for string/deque/forward_list/list/vector and the unorde

2014-03-06 Thread Sebastian Redl
On 2014-03-05 20:06, Marshall Clow wrote: Author: marshall Date: Wed Mar 5 13:06:20 2014 New Revision: 202994 URL: http://llvm.org/viewvc/llvm-project?rev=202994view=rev Log: Implement LWG 2193. Default constructors for standard library containers are explicit. Note that libc++ already did

Re: [PATCH] Add an argument comment checker to clang-tidy.

2014-03-06 Thread Alexander Kornienko
Comment at: clang-tidy/llvm/LLVMTidyModule.cpp:131 @@ +130,3 @@ + diag(PVD-getLocation(), %0 declared here, DiagnosticIDs::Note) + II; +} Alexander Kornienko wrote: Peter Collingbourne wrote: Alexander Kornienko wrote: I

[PATCH] Use range-based for loops for better readability. No functional changes intended.

2014-03-06 Thread Alexander Kornienko
Hi chandlerc, http://llvm-reviews.chandlerc.com/D2979 Files: clang-tidy/ClangTidy.cpp Index: clang-tidy/ClangTidy.cpp === --- clang-tidy/ClangTidy.cpp +++ clang-tidy/ClangTidy.cpp @@ -66,24 +66,18 @@ void

Re: [PATCH] Use range-based for loops for better readability. No functional changes intended.

2014-03-06 Thread Chandler Carruth
Nits below. Comment at: clang-tidy/ClangTidy.cpp:159 @@ -171,7 +158,3 @@ std::vectorstd::string CheckNames; - for (ClangTidyCheckFactories::FactoryMap::const_iterator - I = CheckFactories-begin(), - E = CheckFactories-end(); - I != E; ++I) { -

Re: [PATCH] Use range-based for loops for better readability. No functional changes intended.

2014-03-06 Thread Alexander Kornienko
Addressed comments, changed the rest of the loops. Hi chandlerc, http://llvm-reviews.chandlerc.com/D2979 CHANGE SINCE LAST DIFF http://llvm-reviews.chandlerc.com/D2979?vs=7588id=7589#toc BRANCH svn ARCANIST PROJECT clang-tools-extra Files: clang-tidy/ClangTidy.cpp

Re: [PATCH] Use range-based for loops for better readability. No functional changes intended.

2014-03-06 Thread Alexander Kornienko
Comment at: clang-tidy/ClangTidy.cpp:159 @@ -171,7 +158,3 @@ std::vectorstd::string CheckNames; - for (ClangTidyCheckFactories::FactoryMap::const_iterator - I = CheckFactories-begin(), - E = CheckFactories-end(); - I != E; ++I) { -if

[clang-tools-extra] r203101 - Use range-based for loops for better readability. No functional changes intended.

2014-03-06 Thread Alexander Kornienko
Author: alexfh Date: Thu Mar 6 04:17:46 2014 New Revision: 203101 URL: http://llvm.org/viewvc/llvm-project?rev=203101view=rev Log: Use range-based for loops for better readability. No functional changes intended. Reviewers: chandlerc Reviewed By: chandlerc CC: cfe-commits Differential

r203108 - [OPENMP] Missed test for 'simd private'

2014-03-06 Thread Alexey Bataev
Author: abataev Date: Thu Mar 6 05:48:22 2014 New Revision: 203108 URL: http://llvm.org/viewvc/llvm-project?rev=203108view=rev Log: [OPENMP] Missed test for 'simd private' Added: cfe/trunk/test/OpenMP/simd_private_messages.cpp (with props) Added:

r203114 - [OPENMP] Updated comments and _OPENMP macro value for OpenMP 4.0 (for 'omp simd' support)

2014-03-06 Thread Alexey Bataev
Author: abataev Date: Thu Mar 6 06:27:56 2014 New Revision: 203114 URL: http://llvm.org/viewvc/llvm-project?rev=203114view=rev Log: [OPENMP] Updated comments and _OPENMP macro value for OpenMP 4.0 (for 'omp simd' support) Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Re: r202951 - [-cxx-abi microsoft] Implement local manglings accurately

2014-03-06 Thread Evgeniy Stepanov
This broke MemorySanitizer bootstrap: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/2507/steps/check-clang%20msan/logs/stdio WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x7fd3e6fb2f66 in (anonymous namespace)::MicrosoftCXXNameMangler::mangleNumber(long)

Re: r203005 - If a #include finds a file relative to the current file, don't forget to check

2014-03-06 Thread Evgeniy Stepanov
I think this broke AddressSanitizer bootstrap: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/2521/steps/check-clang%20asan/logs/stdio ERROR: AddressSanitizer: heap-use-after-free on address 0x6030dff0 at pc 0x675fd7e bp 0x7fffd300c690 sp 0x7fffd300c688 READ of size

[PATCH] Added an inserter for ArrayRefSourceRange.

2014-03-06 Thread Alexander Kornienko
Hi jordan_rose, Added an inserter for ArrayRefSourceRange, as it is already needed in at least two places (static analyzer and clang-tidy). http://llvm-reviews.chandlerc.com/D2984 Files: include/clang/Basic/Diagnostic.h lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Index:

Re: [PATCH] Added an inserter for ArrayRefSourceRange.

2014-03-06 Thread Dmitri Gribenko
LGTM. This would be OK for post-commit review, I think. http://llvm-reviews.chandlerc.com/D2984 ___ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

[PATCH] Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual inheritance hierarchy

2014-03-06 Thread Timur Iskhodzhanov
Hi rnk, Also refactor/simplify code a little bit, as well as fix a few bugs in the return adjustment handling http://llvm-reviews.chandlerc.com/D2985 Files: lib/AST/VTableBuilder.cpp test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp

r203117 - Added an inserter for ArrayRefSourceRange.

2014-03-06 Thread Alexander Kornienko
Author: alexfh Date: Thu Mar 6 07:23:30 2014 New Revision: 203117 URL: http://llvm.org/viewvc/llvm-project?rev=203117view=rev Log: Added an inserter for ArrayRefSourceRange. Summary: Added an inserter for ArrayRefSourceRange, as it is already needed in at least two places (static analyzer and

Re: [PATCH] Added an inserter for ArrayRefSourceRange.

2014-03-06 Thread Alexander Kornienko
Closed by commit rL203117 (authored by @alexfh). CHANGED PRIOR TO COMMIT http://llvm-reviews.chandlerc.com/D2984?vs=7596id=7598#toc http://llvm-reviews.chandlerc.com/D2984 COMMIT http://llvm-reviews.chandlerc.com/rL203117 ___ cfe-commits

[clang-tools-extra] r203118 - Use the appropriate operator instead of addRanges.

2014-03-06 Thread Alexander Kornienko
Author: alexfh Date: Thu Mar 6 07:24:28 2014 New Revision: 203118 URL: http://llvm.org/viewvc/llvm-project?rev=203118view=rev Log: Use the appropriate operator instead of addRanges. Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp Modified:

r203120 - Reformatting the style used within the massive attribute semantic handling switch statement, so now there is only one style used in this block of code, instead of three or more styles.

2014-03-06 Thread Aaron Ballman
Author: aaronballman Date: Thu Mar 6 08:02:27 2014 New Revision: 203120 URL: http://llvm.org/viewvc/llvm-project?rev=203120view=rev Log: Reformatting the style used within the massive attribute semantic handling switch statement, so now there is only one style used in this block of code,

r203122 - [C++11] Adding override specifiers where appropriate, and removing virtual specifiers where not needed.

2014-03-06 Thread Aaron Ballman
Author: aaronballman Date: Thu Mar 6 09:09:50 2014 New Revision: 203122 URL: http://llvm.org/viewvc/llvm-project?rev=203122view=rev Log: [C++11] Adding override specifiers where appropriate, and removing virtual specifiers where not needed. No functional changes intended. Modified:

r203124 - [ASTPrinter] 'SEL' isn't a ObjCObjectPointer, so we don't need to handle it in TypePrinter::printObjCObjectPointerBefore.

2014-03-06 Thread Argyrios Kyrtzidis
Author: akirtzidis Date: Thu Mar 6 09:31:56 2014 New Revision: 203124 URL: http://llvm.org/viewvc/llvm-project?rev=203124view=rev Log: [ASTPrinter] 'SEL' isn't a ObjCObjectPointer, so we don't need to handle it in TypePrinter::printObjCObjectPointerBefore. Suggested by Jordan. Modified:

[Patch][Review][Commit] Addition to users manual

2014-03-06 Thread Jonathan 'Rynn' Sauer
Hello, the attached patch adds documentation for a few of clang's command line options for processing comments. Please review and, if ok, commit. With many thanks in advance, Jonathan P.S: Related cfe-dev thread: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-March/035783.html

[PATCH] Preserve hanging indent when breaking line comments.

2014-03-06 Thread Alexander Kornienko
Hi djasper, If we need to break the second line here: // something: a a aa a a //a a aa a a a with the patch it will be turned to // something: a a aa a a //a a aa a a //a

[libcxx] r203126 - Fix a couple of -Wabsolute-value warnings in the libc++ tests

2014-03-06 Thread Marshall Clow
Author: marshall Date: Thu Mar 6 10:27:17 2014 New Revision: 203126 URL: http://llvm.org/viewvc/llvm-project?rev=203126view=rev Log: Fix a couple of -Wabsolute-value warnings in the libc++ tests Modified: libcxx/trunk/test/depr/depr.c.headers/math_h.pass.cpp

r203128 - Expand documentation section on comment parsing

2014-03-06 Thread Dmitri Gribenko
Author: gribozavr Date: Thu Mar 6 10:32:09 2014 New Revision: 203128 URL: http://llvm.org/viewvc/llvm-project?rev=203128view=rev Log: Expand documentation section on comment parsing Patch by Jonathan Sauer, with a little editing by me. Modified: cfe/trunk/docs/UsersManual.rst Modified:

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread jahanian
On Mar 5, 2014, at 5:10 PM, Rafael Espindola rafael.espind...@gmail.com wrote: Author: rafael Date: Wed Mar 5 19:10:46 2014 New Revision: 203052 URL: http://llvm.org/viewvc/llvm-project?rev=203052view=rev Log: Construct GlobalValues with the correct linkage instead of using setLinkage.

Re: [Patch][Review][Commit] Addition to users manual

2014-03-06 Thread Dmitri Gribenko
On Thu, Mar 6, 2014 at 4:16 PM, Jonathan 'Rynn' Sauer jonathan.sa...@gmx.de wrote: Hello, the attached patch adds documentation for a few of clang's command line options for processing comments. Please review and, if ok, commit. Thank you! Committed r203128. Dmitri --

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Rafael Espíndola
This is changing the linkage. Can you add comment why changing this will not change visibility of the symbol. Also, please add a test for this change. Sorry, I should have been more clear in the commit message. There is no functionality change. We just set the linkage at construction time

[PATCH] Deduplicate clang-tidy error messages by file, offset and message.

2014-03-06 Thread Alexander Kornienko
Hi djasper, pcc, Peter, I guess, this can help you in testing your check. http://llvm-reviews.chandlerc.com/D2989 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp test/clang-tidy/deduplication.cpp Index: clang-tidy/ClangTidyDiagnosticConsumer.cpp

Re: r203117 - Added an inserter for ArrayRefSourceRange.

2014-03-06 Thread David Blaikie
On Thu, Mar 6, 2014 at 5:23 AM, Alexander Kornienko ale...@google.com wrote: Author: alexfh Date: Thu Mar 6 07:23:30 2014 New Revision: 203117 URL: http://llvm.org/viewvc/llvm-project?rev=203117view=rev Log: Added an inserter for ArrayRefSourceRange. Summary: Added an inserter for

Re: r203117 - Added an inserter for ArrayRefSourceRange.

2014-03-06 Thread Alexander Kornienko
On Thu, Mar 6, 2014 at 6:14 PM, David Blaikie dblai...@gmail.com wrote: On Thu, Mar 6, 2014 at 5:23 AM, Alexander Kornienko ale...@google.com wrote: Author: alexfh Date: Thu Mar 6 07:23:30 2014 New Revision: 203117 URL: http://llvm.org/viewvc/llvm-project?rev=203117view=rev Log:

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread jahanian
There is functional change. In the test case: @interface NSObject @end @protocol P0; @interface A : NSObject P0 +(Class) getClass; @end @implementation A +(Class) getClass { return self; } @end int main() { Protocol *P0 = @protocol(P0); return 0; } Before the change: nm -nm t.o | grep

Re: [PATCH] Deduplicate clang-tidy error messages by file, offset and message.

2014-03-06 Thread Manuel Klimek
On Mar 6, 2014 6:16 PM, Alexander Kornienko ale...@google.com wrote: Hi djasper, pcc, Peter, I guess, this can help you in testing your check. http://llvm-reviews.chandlerc.com/D2989 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp test/clang-tidy/deduplication.cpp Index:

r203131 - Run -fprofile-instr tests with %clang_cc1.

2014-03-06 Thread Bob Wilson
Author: bwilson Date: Thu Mar 6 11:18:34 2014 New Revision: 203131 URL: http://llvm.org/viewvc/llvm-project?rev=203131view=rev Log: Run -fprofile-instr tests with %clang_cc1. This should help avoid problems like the buildbot fallout from my change in r203085. I left the CodeGenCXX tests alone

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread jahanian
Nick +1. On Mar 6, 2014, at 9:21 AM, jahanian fjahan...@apple.com wrote: There is functional change. In the test case: @interface NSObject @end @protocol P0; @interface A : NSObject P0 +(Class) getClass; @end @implementation A +(Class) getClass { return self; } @end int

Re: [PATCH] Deduplicate clang-tidy error messages by file, offset and message.

2014-03-06 Thread Alexander Kornienko
Addressed review comments. Hi djasper, pcc, http://llvm-reviews.chandlerc.com/D2989 CHANGE SINCE LAST DIFF http://llvm-reviews.chandlerc.com/D2989?vs=7603id=7604#toc Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp test/clang-tidy/deduplication.cpp Index:

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Nick Kledzik
Rafael, The “weak-def” part is being lost. That means the linker cannot coalesce the copies. -Nick On Mar 6, 2014, at 9:21 AM, jahanian fjahan...@apple.com wrote: There is functional change. In the test case: @interface NSObject @end @protocol P0; @interface A : NSObject P0

Re: [PATCH] Deduplicate clang-tidy error messages by file, offset and message.

2014-03-06 Thread Alexander Kornienko
Addressed all review comments ;) Hi djasper, pcc, http://llvm-reviews.chandlerc.com/D2989 CHANGE SINCE LAST DIFF http://llvm-reviews.chandlerc.com/D2989?vs=7604id=7605#toc Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp test/clang-tidy/deduplication.cpp Index:

Re: [PATCH] Deduplicate clang-tidy error messages by file, offset and message.

2014-03-06 Thread Alexander Kornienko
On Thu, Mar 6, 2014 at 6:23 PM, Manuel Klimek kli...@google.com wrote: On Mar 6, 2014 6:16 PM, Alexander Kornienko ale...@google.com wrote: +if (M1.FileOffset M2.FileOffset) + return true; +if (M1.FileOffset M2.FileOffset) + return false; I'd write those as: If (a

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Rafael Espíndola
looking. On 6 March 2014 12:39, Nick Kledzik kled...@apple.com wrote: Rafael, The “weak-def” part is being lost. That means the linker cannot coalesce the copies. -Nick On Mar 6, 2014, at 9:21 AM, jahanian fjahan...@apple.com wrote: There is functional change. In the test case:

r203140 - Fix use-after-free detected by ASan bootstrap.

2014-03-06 Thread Richard Smith
Author: rsmith Date: Thu Mar 6 12:08:08 2014 New Revision: 203140 URL: http://llvm.org/viewvc/llvm-project?rev=203140view=rev Log: Fix use-after-free detected by ASan bootstrap. Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp URL:

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Rafael Espíndola
On 6 March 2014 13:40, Rafael Espíndola rafael.espind...@gmail.com wrote: looking. The provided testcase is identical before and after the change. The difference on trunk is from r203059. Nick, can you please explain what does it mean for a symbol to have a linker private prefix 'l' and yet be

r203141 - Revert Use private linkage for remaining GlobalVariables with private names.

2014-03-06 Thread Rafael Espindola
Author: rafael Date: Thu Mar 6 12:54:12 2014 New Revision: 203141 URL: http://llvm.org/viewvc/llvm-project?rev=203141view=rev Log: Revert Use private linkage for remaining GlobalVariables with private names. This reverts commit r203059. Revert while we discuss what does it mean to be private

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Nick Kledzik
On Mar 6, 2014, at 10:56 AM, Rafael Espíndola rafael.espind...@gmail.com wrote: On 6 March 2014 13:40, Rafael Espíndola rafael.espind...@gmail.com wrote: looking. The provided testcase is identical before and after the change. The difference on trunk is from r203059. Nick, can you

r203144 - Very minor simplification and typo correction; no functional changes intended.

2014-03-06 Thread Aaron Ballman
Author: aaronballman Date: Thu Mar 6 13:10:16 2014 New Revision: 203144 URL: http://llvm.org/viewvc/llvm-project?rev=203144view=rev Log: Very minor simplification and typo correction; no functional changes intended. Modified: cfe/trunk/lib/Analysis/ThreadSafety.cpp Modified:

r203145 - MS ABI: Fix the initializer/finalizer mangling for static data members

2014-03-06 Thread David Majnemer
Author: majnemer Date: Thu Mar 6 13:10:27 2014 New Revision: 203145 URL: http://llvm.org/viewvc/llvm-project?rev=203145view=rev Log: MS ABI: Fix the initializer/finalizer mangling for static data members Initializers and finalizers for static data members have the variable's access-specifier,

Re: r202360 - [OPENMP] First changes for Parsing and Sema for 'omp simd' directive support

2014-03-06 Thread Hal Finkel
- Original Message - From: Alexey Bataev a.bat...@hotmail.com To: cfe-commits@cs.uiuc.edu Sent: Thursday, February 27, 2014 2:29:13 AM Subject: r202360 - [OPENMP] First changes for Parsing and Sema for 'omp simd' directive support Author: abataev Date: Thu Feb 27 02:29:12 2014

r203147 - Add tests for MS inline asm change r203146

2014-03-06 Thread Reid Kleckner
Author: rnk Date: Thu Mar 6 13:19:36 2014 New Revision: 203147 URL: http://llvm.org/viewvc/llvm-project?rev=203147view=rev Log: Add tests for MS inline asm change r203146 Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c cfe/trunk/test/Sema/ms-inline-asm.c Modified:

r203148 - Refactored to use a simple helper function that wraps the logic of creating an SExprNode and returning the position in which it was inserted.

2014-03-06 Thread Aaron Ballman
Author: aaronballman Date: Thu Mar 6 13:25:11 2014 New Revision: 203148 URL: http://llvm.org/viewvc/llvm-project?rev=203148view=rev Log: Refactored to use a simple helper function that wraps the logic of creating an SExprNode and returning the position in which it was inserted. No functional

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Rafael Espíndola
weak-def tells the linker the content can be merged/coalesced by name. The ‘l’ symbol prefix tells the linker the not add the symbol name to the final output. This combination really only make sense for visibility=hidden symbols (which they were). OK. Lets try to figure out the correct way

r203149 - Based on usage, the NamedDecl is always set when constructing a CallingContext, but none of the other optional parameters are. Removing the optional parameters, and making the NamedDecl requ

2014-03-06 Thread Aaron Ballman
Author: aaronballman Date: Thu Mar 6 13:37:24 2014 New Revision: 203149 URL: http://llvm.org/viewvc/llvm-project?rev=203149view=rev Log: Based on usage, the NamedDecl is always set when constructing a CallingContext, but none of the other optional parameters are. Removing the optional

Re: [PATCH] Delete various dead assignments

2014-03-06 Thread Richard Smith
These all look like bugs, but I don't think dropping the assignment is the right thing to do in every case. http://llvm-reviews.chandlerc.com/D2882 ___ cfe-commits mailing list cfe-commits@cs.uiuc.edu

r203151 - MS ABI: Disambiguate the manglings for global guard variables

2014-03-06 Thread David Majnemer
Author: majnemer Date: Thu Mar 6 13:57:36 2014 New Revision: 203151 URL: http://llvm.org/viewvc/llvm-project?rev=203151view=rev Log: MS ABI: Disambiguate the manglings for global guard variables If a guard variable will be created for an entity at global scope, then we cannot rely on the scope

r203153 - Fix dead store and simplify. No functionality change (although the code is now

2014-03-06 Thread Richard Smith
Author: rsmith Date: Thu Mar 6 14:00:05 2014 New Revision: 203153 URL: http://llvm.org/viewvc/llvm-project?rev=203153view=rev Log: Fix dead store and simplify. No functionality change (although the code is now correct if MaxEditDistance were increased to something greater than 1). Modified:

Re: [libcxx] r203126 - Fix a couple of -Wabsolute-value warnings in the libc++ tests

2014-03-06 Thread Joerg Sonnenberger
On Thu, Mar 06, 2014 at 04:27:18PM -, Marshall Clow wrote: Author: marshall Date: Thu Mar 6 10:27:17 2014 New Revision: 203126 URL: http://llvm.org/viewvc/llvm-project?rev=203126view=rev Log: Fix a couple of -Wabsolute-value warnings in the libc++ tests Modified:

Re: [PATCH] Adding type info for f16c floating-point type

2014-03-06 Thread Yunzhong Gao
Ping. At least for x86-64, the half-precision floating-point type is mentioned in the ia64-abi in 2.9.2 Place of Emission: Specifically, the run-time support library should contain type_info objects for the types X, X* and X const*, for every X in: void, std::nullptr_t, bool, wchar_t,

r203157 - PGO: Add support for Objective-C blocks.

2014-03-06 Thread Bob Wilson
Author: bwilson Date: Thu Mar 6 14:24:27 2014 New Revision: 203157 URL: http://llvm.org/viewvc/llvm-project?rev=203157view=rev Log: PGO: Add support for Objective-C blocks. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp cfe/trunk/lib/CodeGen/CodeGenPGO.cpp

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Nick Kledzik
On Mar 6, 2014, at 11:40 AM, Rafael Espíndola rafael.espind...@gmail.com wrote: weak-def tells the linker the content can be merged/coalesced by name. The ‘l’ symbol prefix tells the linker the not add the symbol name to the final output. This combination really only make sense for

r203158 - [docs] s/cpp11-migrate/clang-modernize/

2014-03-06 Thread Rui Ueyama
Author: ruiu Date: Thu Mar 6 14:30:05 2014 New Revision: 203158 URL: http://llvm.org/viewvc/llvm-project?rev=203158view=rev Log: [docs] s/cpp11-migrate/clang-modernize/ Modified: cfe/trunk/docs/ClangTools.rst Modified: cfe/trunk/docs/ClangTools.rst URL:

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Rafael Espíndola
* Is the merge required to happen or it is just an optimization? It is an optimization to reduce duplicate copies of objc data structures. The merge has always happened before, I don’t know if there is anything in the runtime that relies on that. But it is a big space savings, so we would

r203161 - Update for LLVM API change

2014-03-06 Thread Saleem Abdulrasool
Author: compnerd Date: Thu Mar 6 14:47:19 2014 New Revision: 203161 URL: http://llvm.org/viewvc/llvm-project?rev=203161view=rev Log: Update for LLVM API change Use the new getObjectFormat/setObjectFormat instead of Environment now that the file format is a separate field. Modified:

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Nick Kledzik
On Mar 6, 2014, at 12:52 PM, Rafael Espíndola rafael.espind...@gmail.com wrote: BTW, what is the interaction of N_NO_DEAD_STRIP and S_ATTR_NO_DEAD_STRIP? N_NO_DEAD_STRIP applies to individual symbols. S_ATTR_NO_DEAD_STRIP applies to everything in a section. The linker ORs the two together to

Re: [libcxx] r203126 - Fix a couple of -Wabsolute-value warnings in the libc++ tests

2014-03-06 Thread David Blaikie
On Thu, Mar 6, 2014 at 12:15 PM, Joerg Sonnenberger jo...@britannica.bec.de wrote: On Thu, Mar 06, 2014 at 04:27:18PM -, Marshall Clow wrote: Author: marshall Date: Thu Mar 6 10:27:17 2014 New Revision: 203126 URL: http://llvm.org/viewvc/llvm-project?rev=203126view=rev Log: Fix a

Re: [libcxx] r203126 - Fix a couple of -Wabsolute-value warnings in the libc++ tests

2014-03-06 Thread Arthur O'Dwyer
On Thu, Mar 6, 2014 at 1:03 PM, David Blaikie dblai...@gmail.com wrote: On Thu, Mar 6, 2014 at 12:15 PM, Joerg Sonnenberger jo...@britannica.bec.de wrote: On Thu, Mar 06, 2014 at 04:27:18PM -, Marshall Clow wrote: -static_assert((std::is_samedecltype(fabsf(0)), float::value), ); -

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Rafael Espíndola
BTW, what is the interaction of N_NO_DEAD_STRIP and S_ATTR_NO_DEAD_STRIP? N_NO_DEAD_STRIP applies to individual symbols. S_ATTR_NO_DEAD_STRIP applies to everything in a section. The linker ORs the two together to decided if an atom is must not be dead stripped. OK, thanks. Just one more

Re: [PATCH] Detect identical conditions in if-else-if statements

2014-03-06 Thread Daniel Fahlgren
Hi Jordan, Thanks for reviewing this. On Wed, 2014-03-05 at 14:38 -0800, Jordan Rose wrote: I'm sorry, I managed to miss this one. Please feel free to include me in the To or CC fields when you have analyzer patches. I'm glad to get this check! It definitely seems useful for copy-paste

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Nick Kledzik
On Mar 6, 2014, at 1:12 PM, Rafael Espíndola rafael.espind...@gmail.com wrote: BTW, what is the interaction of N_NO_DEAD_STRIP and S_ATTR_NO_DEAD_STRIP? N_NO_DEAD_STRIP applies to individual symbols. S_ATTR_NO_DEAD_STRIP applies to everything in a section. The linker ORs the two together

r203165 - PGO: rename FileCheck variable to follow the existing convention.

2014-03-06 Thread Bob Wilson
Author: bwilson Date: Thu Mar 6 15:35:59 2014 New Revision: 203165 URL: http://llvm.org/viewvc/llvm-project?rev=203165view=rev Log: PGO: rename FileCheck variable to follow the existing convention. I added this STF variable without noticing that all the other counter names end with a C.

r203166 - PGO: rename profile data files from .pgodata to .profdata.

2014-03-06 Thread Bob Wilson
Author: bwilson Date: Thu Mar 6 15:36:04 2014 New Revision: 203166 URL: http://llvm.org/viewvc/llvm-project?rev=203166view=rev Log: PGO: rename profile data files from .pgodata to .profdata. These tests were added before we had settled on using a .profdata extension for the profile data files.

Re: r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

2014-03-06 Thread Rafael Espíndola
Just one more question. When doing LTO, what will ld64 tell us about these symbols? Will it say that they are required and that llvm should not hide them? In general ld64 only uses lto_codegen_add_must_preserve_symbol() if: * the symbol is referenced by a mach-o file * some command line

r203167 - Remove dead code I introduced 6 years, 4 months ago in r43518.

2014-03-06 Thread Ted Kremenek
Author: kremenek Date: Thu Mar 6 15:42:43 2014 New Revision: 203167 URL: http://llvm.org/viewvc/llvm-project?rev=203167view=rev Log: Remove dead code I introduced 6 years, 4 months ago in r43518. Found by -Wunreachable-code. Modified: cfe/trunk/lib/Basic/SourceManager.cpp Modified:

r203168 - Exclude invalid old decl from mismatching linkage assertion

2014-03-06 Thread Ismail Pazarbasi
Author: ismailp Date: Thu Mar 6 15:48:45 2014 New Revision: 203168 URL: http://llvm.org/viewvc/llvm-project?rev=203168view=rev Log: Exclude invalid old decl from mismatching linkage assertion This patch fixes PR18964. In linkage computation, assertion fails when an old invalid declaration's

r203169 - Remove a dead store, add a FIXME for another.

2014-03-06 Thread Richard Smith
Author: rsmith Date: Thu Mar 6 15:59:38 2014 New Revision: 203169 URL: http://llvm.org/viewvc/llvm-project?rev=203169view=rev Log: Remove a dead store, add a FIXME for another. Modified: cfe/trunk/lib/Lex/ModuleMap.cpp cfe/trunk/tools/c-index-test/c-index-test.c Modified:

Re: [PATCH] Delete various dead assignments

2014-03-06 Thread Richard Smith
Comment at: lib/AST/CommentCommandTraits.cpp:65 @@ -64,3 +64,2 @@ BestCommand.push_back(Command); -BestEditDistance = EditDistance; } Fixed in r203153. Comment at: lib/Lex/ModuleMap.cpp:1965 @@ -1964,3 +1964,2 @@

r203170 - Make the test a bit stronger by showing what is added to llvm.used.

2014-03-06 Thread Rafael Espindola
Author: rafael Date: Thu Mar 6 16:02:16 2014 New Revision: 203170 URL: http://llvm.org/viewvc/llvm-project?rev=203170view=rev Log: Make the test a bit stronger by showing what is added to llvm.used. Modified: cfe/trunk/test/CodeGenObjC/forward-protocol-metadata-symbols.m Modified:

Re: r203167 - Remove dead code I introduced 6 years, 4 months ago in r43518.

2014-03-06 Thread Ted Kremenek
Argyrios corrected me that I read “blame wrong. The real culprit was r40460, ;-) On Mar 6, 2014, at 1:42 PM, Ted Kremenek kreme...@apple.com wrote: Author: kremenek Date: Thu Mar 6 15:42:43 2014 New Revision: 203167 URL: http://llvm.org/viewvc/llvm-project?rev=203167view=rev Log:

[PATCH] lex: improve include handling on Linux for Windows

2014-03-06 Thread Saleem Abdulrasool
Hi majnemer, Normalise the path separator character on non-windows platforms. Although this would work on Windows as well (most newer versions of Windows support either '/' or '\' as a path separator character), it could potentially cause problems with full UNC paths. This change enables the

[PATCH] MS asm: Filter out fpsw clobbers

2014-03-06 Thread Reid Kleckner
Hi echristo, When parsing MS inline assembly, we note that fpsw is an implicit def of most x87 FP operations, and add it to the clobber list. However, we don't recognize fpsw as a gcc register name, and we assert. Clang always adds an fpsr clobber, which means the same thing to LLVM, so we can

r203172 - Use llvm.compiler.used instead of llvm.used for objc symbols.

2014-03-06 Thread Rafael Espindola
Author: rafael Date: Thu Mar 6 16:15:10 2014 New Revision: 203172 URL: http://llvm.org/viewvc/llvm-project?rev=203172view=rev Log: Use llvm.compiler.used instead of llvm.used for objc symbols. LLVM currently has a hack (shouldEmitUsedDirectiveFor) that causes it to not print no_dead_strip for

Re: [PATCH] Support case insensitive header searches for MSVCCompat

2014-03-06 Thread David Majnemer
Modulo needing some style fixes, this looks fine. However, I'd prefer for @rsmith look at this at least to make sure it plays nice with modules. On Wed Mar 05 2014 at 1:18:22 PM, Nico Weber tha...@chromium.org wrote: The compiler won't be the only place with issues like this though, no? Say

Re: [libcxx] r203126 - Fix a couple of -Wabsolute-value warnings in the libc++ tests

2014-03-06 Thread Joerg Sonnenberger
On Thu, Mar 06, 2014 at 01:10:54PM -0800, Arthur O'Dwyer wrote: On Thu, Mar 6, 2014 at 1:03 PM, David Blaikie dblai...@gmail.com wrote: On Thu, Mar 6, 2014 at 12:15 PM, Joerg Sonnenberger jo...@britannica.bec.de wrote: On Thu, Mar 06, 2014 at 04:27:18PM -, Marshall Clow wrote: -

r203175 - C. Compare vector sizes using their raw element size instead of

2014-03-06 Thread Fariborz Jahanian
Author: fjahanian Date: Thu Mar 6 16:47:09 2014 New Revision: 203175 URL: http://llvm.org/viewvc/llvm-project?rev=203175view=rev Log: C. Compare vector sizes using their raw element size instead of getTypeSize (which rounds up sizes) in order to issue diagnostics when casting to mismatched

Re: [PATCH] lex: improve include handling on Linux for Windows

2014-03-06 Thread David Majnemer
LGTM Comment at: lib/Lex/PPDirectives.cpp:1453 @@ -1451,1 +1452,3 @@ SourceLocation FilenameLoc = FilenameTok.getLocation(); + SmallString1024 NormalizedPath; + if (LangOpts.MSVCCompat) { Another 1k of stack for a relatively rare case :/

Re: [PATCH] MS asm: Filter out fpsw clobbers

2014-03-06 Thread Benjamin Kramer
Comment at: lib/Parse/ParseStmt.cpp:2216-2217 @@ +2215,4 @@ + // fpsr as clobbers. + auto End = std::remove_if(Clobbers.begin(), Clobbers.end(), +[](const std::string s) { return s == fpsw; }); + Clobbers.erase(End, Clobbers.end());

Re: r203167 - Remove dead code I introduced 6 years, 4 months ago in r43518.

2014-03-06 Thread Chris Lattner
Fortunately, I don't get emotionally attached to my old code. I prefer that it get rewritten by better programmers than me, but hey, deleting it outright works too. :-) -Chris On Mar 6, 2014, at 2:14 PM, Ted Kremenek kreme...@apple.com wrote: Argyrios corrected me that I read “blame wrong.

r203179 - [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/en

2014-03-06 Thread Aaron Ballman
Author: aaronballman Date: Thu Mar 6 17:45:36 2014 New Revision: 203179 URL: http://llvm.org/viewvc/llvm-project?rev=203179view=rev Log: [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for

Re: r203179 - [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begi

2014-03-06 Thread Aaron Ballman
On Thu, Mar 6, 2014 at 7:10 PM, Tobias Grosser tob...@grosser.es wrote: On 03/07/2014 12:45 AM, Aaron Ballman wrote: Author: aaronballman Date: Thu Mar 6 17:45:36 2014 New Revision: 203179 URL: http://llvm.org/viewvc/llvm-project?rev=203179view=rev Log: [C++11] Replacing iterators

Re: r203179 - [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begi

2014-03-06 Thread Tobias Grosser
On 03/07/2014 12:45 AM, Aaron Ballman wrote: Author: aaronballman Date: Thu Mar 6 17:45:36 2014 New Revision: 203179 URL: http://llvm.org/viewvc/llvm-project?rev=203179view=rev Log: [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of

Re: [PATCH] Change -fdiagnostics-format=msvc column number to match VS2012 and VS2013

2014-03-06 Thread Reid Kleckner
LGTM On Wed, Mar 5, 2014 at 4:07 PM, Yunzhong Gao yunzhong_...@playstation.sony.com wrote: Hi Reid, Yes that is doable. I can use a combination of -fdiagnostics-format=msvc -fmsc-version=1300 to get the old behavior. I updated the patch. - Gao

r203182 - Partial revert of r203179. The build bots are telling me that some out-of-tree builds are using redecls_begin()/redecls_end(), so adding some machinery back in to support them.

2014-03-06 Thread Aaron Ballman
Author: aaronballman Date: Thu Mar 6 18:10:58 2014 New Revision: 203182 URL: http://llvm.org/viewvc/llvm-project?rev=203182view=rev Log: Partial revert of r203179. The build bots are telling me that some out-of-tree builds are using redecls_begin()/redecls_end(), so adding some machinery back

Re: [PATCH] lex: improve include handling on Linux for Windows

2014-03-06 Thread NAKAMURA Takumi
I think dir\file may be accepted for targeting whole win32. (excluding cygwin). If normalizations would depend on host OS (win32 or others), you may introduce local normalization here. http://llvm-reviews.chandlerc.com/D2994 ___ cfe-commits

r203183 - The Visual Studio IDE changed behavior in VS2012. It used to be the case that

2014-03-06 Thread Yunzhong Gao
Author: ygao Date: Thu Mar 6 18:23:36 2014 New Revision: 203183 URL: http://llvm.org/viewvc/llvm-project?rev=203183view=rev Log: The Visual Studio IDE changed behavior in VS2012. It used to be the case that the clang diagnostic has to report a column number one less than the correct value in

Re: [PATCH] Change -fdiagnostics-format=msvc column number to match VS2012 and VS2013

2014-03-06 Thread Yunzhong Gao
Closed by commit rL203183 (authored by @ygao). CHANGED PRIOR TO COMMIT http://llvm-reviews.chandlerc.com/D2949?vs=7572id=7617#toc http://llvm-reviews.chandlerc.com/D2949 COMMIT http://llvm-reviews.chandlerc.com/rL203183 ___ cfe-commits mailing

Re: Add module dependencies with -MD, -MMD

2014-03-06 Thread Ben Langmuir
On Mar 5, 2014, at 7:54 PM, Argyrios Kyrtzidis kyrtzi...@apple.com wrote: @@ -2014,13 +2074,17 @@ ASTReader::ReadControlBlock(ModuleFile F, // files. unsigned NumInputs = Record[0]; unsigned NumUserInputs = Record[1]; -unsigned N = ValidateSystemInputs || -

  1   2   >