summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Add loc() to the dynamic registry.Samuel Benzaquen2014-03-108-26/+99
| | | | | | | | | | | | | | | | | | Summary: Add loc() to the dynamic registry. Other fixes: - Fix the polymorphic variant value to accept an exact match, even if there are other possible conversions. - Fix specifiesTypeLoc() to not crash on an empty NestedNameSpecifierLoc. Reviewers: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2928 llvm-svn: 203467
* clang-format: Add spaces between lambdas and comments.Daniel Jasper2014-03-102-1/+8
| | | | | | | | | | | | | | | | | | Before: void f() { bar([]() {}// Does not respect SpacesBeforeTrailingComments ); } After: void f() { bar([]() {} // Does not respect SpacesBeforeTrailingComments ); } This fixes llvm.org/PR19017. llvm-svn: 203466
* Reverting llvm::distance changes to use std::distance with iterators ↵Aaron Ballman2014-03-105-15/+11
| | | | | | | | instead, per post-commit review feedback. Replacing llvm::copy changes with SmallVector range-based construction which is a considerably cleaner approach. llvm-svn: 203461
* Preserve hanging indent when breaking line comments.Alexander Kornienko2014-03-102-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If we need to break the second line here: // something: aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa aaaaa aaaaaa aaaaa aaaaa aaaaa with the patch it will be turned to // something: aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa instead of // something: aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2988 llvm-svn: 203458
* Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacrosRobert Lytton2014-03-103-15/+16
| | | | llvm-svn: 203455
* clang-format: Add spaces around trailing/lambda return types.Daniel Jasper2014-03-103-4/+8
| | | | | | | | | | Before: int c = []()->int { return 2; }(); After: int c = []() -> int { return 2; }(); llvm-svn: 203452
* clang/test/Index/preamble-reparse-warn-*.c: Stabilize on win32.NAKAMURA Takumi2014-03-102-7/+4
| | | | llvm-svn: 203446
* clang/test/Index/preamble-reparse-warn-*.c: Use @LINE in FileCheck.NAKAMURA Takumi2014-03-102-5/+5
| | | | llvm-svn: 203445
* When a type's definition is instantiated, the definition becomes visible, evenRichard Smith2014-03-108-2/+95
| | | | | | | | | if the type's declaration was previously instantiated in an unimported module. (For an imported type definition, this already worked, because the source location is set to the location of the definition, but for locally-instantiated type definitions, it did not.) llvm-svn: 203425
* Remove trailing whitespace.Bob Wilson2014-03-091-1/+1
| | | | llvm-svn: 203422
* Tab to spaces. No functionality change.Nick Lewycky2014-03-091-1/+1
| | | | llvm-svn: 203417
* Fix uninitialized value in AttributedTypeLoc.Logan Chien2014-03-091-3/+10
| | | | | | | | | | | Clang might crash while reading the precompiled headers if we don't initialize the AttrEnumOperandLoc properly. This commit fixes the combination of string attribute operand and enum operand. Besides, this commit also adds several assertions to avoid unexpected operand kind. llvm-svn: 203416
* [C++11] Replacing some using declarations which are not supported on all ↵Aaron Ballman2014-03-092-6/+3
| | | | | | compilers (such as MSVC 2012) with a less problematic typedef. llvm-svn: 203397
* [C++11] Use std::unique_ptr for ownership in a vector.Ahmed Charles2014-03-091-24/+14
| | | | | | Also change to using range-based for loops. No functional change intended. llvm-svn: 203396
* Fix build break, replace take() with release().Ahmed Charles2014-03-091-1/+1
| | | | llvm-svn: 203390
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-0958-58/+58
| | | | llvm-svn: 203389
* [C++11] Remove the remaining uses of OwningPtr.Ahmed Charles2014-03-0913-23/+20
| | | | | | Replace OwningArrayPtr with std::unique_ptr<T[]>. llvm-svn: 203388
* [-Wunreachable-code] Handle Objective-C bool literals in 'isConfigurationValue'.Ted Kremenek2014-03-094-26/+92
| | | | | | | This includes special casing 'YES' and 'NO', which are constants defined as macros. llvm-svn: 203380
* Update clang to account for changes made to LLVM in r203376David Majnemer2014-03-093-3/+3
| | | | llvm-svn: 203377
* Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s ↵David Blaikie2014-03-092-2/+2
| | | | | | operator== llvm-svn: 203373
* [Sema] Fix assertion hit with #pragma weak.Argyrios Kyrtzidis2014-03-092-0/+5
| | | | | | rdar://16264844 llvm-svn: 203372
* [libclang] Don't pad the main buffer for the preamble.Argyrios Kyrtzidis2014-03-094-44/+32
| | | | | | | | | Padding does not seem to be useful currently, and it leads to bogus location if an error points to the end of the file. rdar://15836513 llvm-svn: 203370
* retain-comments-from-system-headers.c: Flush module cache, or incremental ↵NAKAMURA Takumi2014-03-091-0/+1
| | | | | | test would fail since r203317. llvm-svn: 203367
* [C++11] Update Clang for the change to LLVM's Use-Def chain iterators inChandler Carruth2014-03-096-14/+10
| | | | | | | | | r203364: what was use_iterator is now user_iterator, and there is a use_iterator for directly iterating over the uses. This also switches to use the range-based APIs where appropriate. llvm-svn: 203365
* [-Wunreachable-code] Tweak heuristic for configuration values to include ↵Ted Kremenek2014-03-082-6/+35
| | | | | | | | | arithmetic operations involving sizeof(), but not raw integers. This case was motivated by a false positive with the llvm::AlignOf<> specialization in LLVM. llvm-svn: 203363
* [C++11] Replacing Decl iterators attr_begin() and attr_end() with ↵Aaron Ballman2014-03-0813-77/+62
| | | | | | | | iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops. This is a reapplication of r203236 with modifications to the definition of attrs() and following the new style guidelines on auto usage. llvm-svn: 203362
* [Preprocessor] Only check for -Wunused-macros if the translation unit kind ↵Argyrios Kyrtzidis2014-03-081-1/+1
| | | | | | is TU_Complete. llvm-svn: 203360
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-0836-303/+151
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-0810-32/+28
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* Reapplying r203299 in a slightly different manner. Now range APIs are ↵Aaron Ballman2014-03-085-52/+34
| | | | | | implemented in terms of iterator APIs. llvm-svn: 203351
* [-Wunreachabe-code] Don't warn about unreachable destructors for temporaries.Ted Kremenek2014-03-082-3/+18
| | | | | | | | This can possibly be refined later, but right now the experience is so incomprehensible for a user to understand what is going on this isn't a useful warning. llvm-svn: 203336
* Fix CFG bug where the 'isTemporaryDtorsBranch' bit was silently lost for ↵Ted Kremenek2014-03-083-13/+21
| | | | | | terminators. llvm-svn: 203335
* [CFG] Record would-be successor for noreturn destructor.Ted Kremenek2014-03-081-2/+4
| | | | llvm-svn: 203334
* [-Wunreachable-code] Handle 'return' with no argument dominated by ↵Ted Kremenek2014-03-082-6/+16
| | | | | | 'noreturn' function. llvm-svn: 203333
* Add an option to disable plugins in clang.Rafael Espindola2014-03-081-3/+12
| | | | | | | | | An option with the same name already exists in the makefile build. The name CLANG_IS_PRODUCTION is historical. We should probably change it, but should change the configure build at the same time. llvm-svn: 203325
* Revert "Add an option to disable plugins in clang."Rafael Espindola2014-03-081-6/+4
| | | | | | | | This reverts commit r203320. There is some order dependency going on that I missed. llvm-svn: 203321
* Add an option to disable plugins in clang.Rafael Espindola2014-03-081-4/+6
| | | | | | An option with the same name already exists in the makefile build. llvm-svn: 203320
* Revert accidentally-committed file.Richard Smith2014-03-081-1/+0
| | | | llvm-svn: 203318
* Module [extern_c] attribute: inherit to submodules, don't write 'extern "C"'Richard Smith2014-03-089-16/+41
| | | | | | blocks when building in C mode, and serialize and deserialize the attribute. llvm-svn: 203317
* Replace "can not" with "cannot" in diagnostics messages.Ismail Pazarbasi2014-03-0723-80/+80
| | | | llvm-svn: 203302
* In my tests, I'm finding that declaring iterators in terms of ranges can ↵Aaron Ballman2014-03-075-16/+41
| | | | | | | | sometimes have dangerous side-effects where the range temporary is destroyed, taking the underlying iterators out with it. This changes the iterators so that they are no longer implemented in terms of ranges (so it's a very partial revert of the existing rangification efforts). llvm-svn: 203299
* [C++11] Revert uses of lambdas with array_pod_sort.Benjamin Kramer2014-03-074-23/+31
| | | | | | Looks like GCC implements the lambda->function pointer conversion differently. llvm-svn: 203293
* [C++11] Convert sort predicates into lambdas.Benjamin Kramer2014-03-076-50/+35
| | | | | | No functionality change. llvm-svn: 203289
* [-Wunreachable-code] Treat constant globals as configuration values in ↵Ted Kremenek2014-03-072-2/+21
| | | | | | | | | unreachable code heuristics. This one could possibly be refined even further; e.g. looking at the initializer and see if it is truly a configuration value. llvm-svn: 203283
* Zap another dead 'break' statement.Ted Kremenek2014-03-071-1/+0
| | | | llvm-svn: 203282
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-07154-537/+512
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with ↵Aaron Ballman2014-03-0721-186/+129
| | | | | | iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203278
* Replace OwningPtr::isValid() with conversion to bool.Ahmed Charles2014-03-078-22/+16
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203277
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-0741-111/+99
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Remove dead return and simplify code.Ted Kremenek2014-03-071-3/+1
| | | | llvm-svn: 203266
OpenPOWER on IntegriCloud