summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Better support for multi-line wide string literals.Daniel Jasper2013-12-203-18/+12
| | | | | | | | | | | Before: SomeFunction(L"A" L"B"); After: SomeFunction(L"A" L"B"); llvm-svn: 197785
* [analyzer] Use DataRecursiveASTVisitor for the AnalysisConsumer.Argyrios Kyrtzidis2013-12-201-2/+2
| | | | llvm-svn: 197767
* Serialize source range info for TypeTraitExpr.Jordan Rose2013-12-202-1/+5
| | | | | | | | | This caused some crazy crashes involving std::unordered_map being deserialized from a PCH file and then template instantiation requiring an explicit instantiation location; unfortunately I don't really know how to come up with a minimal test case. llvm-svn: 197764
* Correctly compute the size in bytes of PreambleFileHash.MD5Dmitri Gribenko2013-12-201-2/+2
| | | | llvm-svn: 197762
* ASTUnit::getMainBufferWithPrecompiledPreamble: use MD5 hash of the remappedDmitri Gribenko2013-12-201-12/+51
| | | | | | | | | | | files to tell if they were changed since the last time we have computed the preamble We used to check only the buffer size, so if the new remapped buffer has the same size as the previous one, we would think that the buffer did not change, and we did not rebuild the preambule, which sometimes caused us to crash. llvm-svn: 197755
* Simplify codeDmitri Gribenko2013-12-191-1/+1
| | | | llvm-svn: 197748
* [analyzer] Always use 'bool' as the SValBuilder condition type in C++.Jordan Rose2013-12-192-2/+2
| | | | | | | | | We have assertions for this, but a few edge cases had snuck through where we were still unconditionally using 'int'. <rdar://problem/15703011> llvm-svn: 197733
* Remove dead code identified by Aaron Ballman.Ted Kremenek2013-12-191-4/+0
| | | | llvm-svn: 197730
* After discussing with John McCall, removing the ns_bridged attribute as it ↵Aaron Ballman2013-12-191-28/+0
| | | | | | is unused. llvm-svn: 197729
* clang-format: Add special case for leading comments in braced lists.Daniel Jasper2013-12-192-7/+17
| | | | | | | | | | | | | | | | | | | A comment following the "{" of a braced list seems to almost always refer to the first element of the list and thus should be aligned to it. Before (with Cpp11 braced list style): SomeFunction({ // Comment 1 "first entry", // Comment 2 "second entry"}); After: SomeFunction({// Comment 1 "first entry", // Comment 2 "second entry"}); llvm-svn: 197725
* Small simplification: p0 is the same as p.Rafael Espindola2013-12-191-1/+1
| | | | llvm-svn: 197700
* clang-format: Increase penalty for breaking comments.Daniel Jasper2013-12-191-1/+1
| | | | | | | | | | | | | Unexpectedly, it seems that people commonly know what they were doing when writing a comment. Also, being more conservative about comment breaking has the advantage of giving more flexibility. If a linebreak within the comment can improve formatting, the author can add it (after which clang-format won't undo it). There is no way to override clang-format's behavior if it breaks a comment. llvm-svn: 197698
* Fix comment typo.Will Wilson2013-12-191-1/+1
| | | | llvm-svn: 197695
* clang-format: Slightly adapt decision of when to break before <<.Daniel Jasper2013-12-191-1/+1
| | | | | | | | | | | | Before: Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaa); After: Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaa); llvm-svn: 197690
* Switching getAttrs calls over to using a specific_attr_iterator. No ↵Aaron Ballman2013-12-191-8/+8
| | | | | | functional changes intended. llvm-svn: 197681
* Switched code from using hasAttr followed by getAttr to simply call getAttr ↵Aaron Ballman2013-12-191-10/+9
| | | | | | | | directly and check the resulting value. No functional changes intended. llvm-svn: 197678
* Switched code from using hasAttr followed by getAttr to simply call getAttr ↵Aaron Ballman2013-12-191-2/+1
| | | | | | | | directly. No functional changes intended. llvm-svn: 197676
* Hosting a call to getAttr so that we don't call it multiple times for the ↵Aaron Ballman2013-12-191-9/+5
| | | | | | same attribute. Also removes a hasAttr that's not required. No functional changes intended. llvm-svn: 197675
* Update SI datalayout for 32-bit private pointersMatt Arsenault2013-12-191-2/+1
| | | | llvm-svn: 197660
* Switched code from using hasAttr followed by getAttr to simply call getAttr ↵Aaron Ballman2013-12-192-18/+14
| | | | | | | | directly and check the resulting value. No functional changes intended. llvm-svn: 197652
* On spacv8 f128 is only aligned to 64 bits.Rafael Espindola2013-12-191-3/+1
| | | | | | | | LLVM already got this right. Found on "Figure 3-1: Scalar Types" on http://sparc.com/standards/psABI3rd.pdf. llvm-svn: 197651
* Switched code from using hasAttr followed by getAttr to simply call getAttr ↵Aaron Ballman2013-12-191-3/+2
| | | | | | | | directly and check the resulting value. No functional changes intended. llvm-svn: 197650
* Switched code from using hasAttr followed by getAttr to simply call getAttr ↵Aaron Ballman2013-12-191-74/+43
| | | | | | | | directly and check the resulting value. Also fixes some minor formatting issues surrounding the getAttr code. No functional changes intended. llvm-svn: 197649
* Replacing calls to getAttr with calls to hasAttr for clarity. No functional ↵Aaron Ballman2013-12-1921-82/+80
| | | | | | change intended -- this only replaces Boolean uses of getAttr. llvm-svn: 197648
* PCH: fix a crash caused by a circular deserialization dependencyDmitri Gribenko2013-12-191-4/+7
| | | | | | | | | We started by trying to deserialize decltype(func-param) in a trailing return type, which causes the function parameter decl to be deserialized, which pulls in the function decl, which pulls the function type, which pulls the same decltype() in the return type, and then we crashed. llvm-svn: 197644
* Debug info: (Bugfix) emit CRV qualifiers for pointers to member functions.Adrian Prantl2013-12-191-4/+6
| | | | | | rdar://problem/15678916. llvm-svn: 197641
* [ms-abi] Update Alignment for VtorDispsWarren Hunt2013-12-191-8/+2
| | | | | | | | The alignment impact of the virtual bases apperas to be applied in order, rather than up front. This patch adds the new behavior and provides a test case. llvm-svn: 197639
* Added a comment about the launch_bounds attribute's AST node being required. ↵Aaron Ballman2013-12-191-4/+8
| | | | | | Since there were no test cases for the attribute, some have been added. This promptly demonstrated a bug with the semantic handling, which is also fixed. llvm-svn: 197637
* Refactor the Microsoft inheritance attribute handling so that it no longer ↵Aaron Ballman2013-12-185-21/+18
| | | | | | has special treatment. Also fixes a minor bug where the attributes were being parsed as though they were GNU-style attributes when they were in fact keyword attributes. llvm-svn: 197629
* Fix the DataLayout string produced by clang for NaCl.Rafael Espindola2013-12-181-1/+12
| | | | | | Reviewed by Derek Schuff. llvm-svn: 197628
* Implemented delayed processing of 'unavailable' checking, just like with ↵Ted Kremenek2013-12-183-71/+129
| | | | | | | | | | | | | | | | | | | | | | | | | 'deprecated'. Fixes <rdar://problem/15584219> and <rdar://problem/12241361>. This change looks large, but all it does is reuse and consolidate the delayed diagnostic logic for deprecation warnings with unavailability warnings. By doing so, it showed various inconsistencies between the diagnostics, which were close, but not consistent. It also revealed some missing "note:"'s in the deprecated diagnostics that were showing up in the unavailable diagnostics, etc. This change also changes the wording of the core deprecation diagnostics. Instead of saying "function has been explicitly marked deprecated" we now saw "'X' has been been explicitly marked deprecated". It turns out providing a bit more context is useful, and often we got the actual term wrong or it was not very precise (e.g., "function" instead of "destructor"). By just saying the name of the thing that is deprecated/deleted/unavailable we define this issue away. This diagnostic can likely be further wordsmithed to be shorter. llvm-svn: 197627
* Use getAsCXXRecordDecl to shorten some gets and castsReid Kleckner2013-12-181-10/+5
| | | | llvm-svn: 197626
* ObjectiveC. support "section" attribute on propertiesFariborz Jahanian2013-12-181-1/+7
| | | | | | and methods. rdar://15450637 llvm-svn: 197625
* Require the type of a by-copy capture to be complete before creating its field.Douglas Gregor2013-12-181-0/+9
| | | | | | | | | | | | The problem here is more serious than the fix implies. Adding a field to a class updates the triviality bits for the class (among other things). Failing to require a complete type before adding the field meant that these updates don't happen in the well-formed case where the capture is an uninstantiated class template specialization, leading the lambda itself to be treated as having a trivial copy constructor when it shouldn't. Fixes <rdar://problem/15560464>. llvm-svn: 197623
* Debug info: Implement (rvalue) reference qualifiers for C++11 non-staticAdrian Prantl2013-12-181-2/+12
| | | | | | | | member functions. Paired commit with LLVM. rdar://problem/15356637 llvm-svn: 197612
* Allow Objective-C pointer conversions following an explicit user conversion.Douglas Gregor2013-12-181-4/+8
| | | | | | Finishes the work started in r194224, and fixes <rdar://problem/15494681>. llvm-svn: 197609
* Objective-C. After providing a fix-it for aFariborz Jahanian2013-12-183-32/+26
| | | | | | | | cstring, converted to NSString, produce the matching AST for it. This also required some refactoring of the previous code. // rdar://14106083 llvm-svn: 197605
* Make setABIAPCS and setABIAAPCS easier to reason about.Rafael Espindola2013-12-181-25/+39
| | | | | | | These functions now always set the same variables in the same order and they don't overlap with thep constructor. llvm-svn: 197604
* Split setABI in two helpers. No functionality change.Rafael Espindola2013-12-181-44/+50
| | | | llvm-svn: 197603
* Fix OpenMP recovery with trailing tokens following the pragmaAlp Toker2013-12-181-0/+2
| | | | | | | | The recovery was failing due to a missing case in SkipUntil(). Also add back tests from r197553 that were reverted in the previous commit. llvm-svn: 197598
* Revert "[OPENMP] Fix for parsing OpenMP directives with extra braces, ↵Alp Toker2013-12-183-60/+39
| | | | | | | | | | | brackets and parens" These parser changes were redundant. The same or better recovery can be achieved with a one-line fix to SkipUntil() due to land in the next commit. This reverts commit r197553. llvm-svn: 197597
* OpenCL: Do not force 64 bit floats for (embedded) targets with only 32bit ↵Pekka Jaaskelainen2013-12-181-2/+8
| | | | | | floats. llvm-svn: 197592
* clang-format parts of the file.Rafael Espindola2013-12-181-18/+9
| | | | | | | I am about to send a patch for review touching these and clang-formating first makes the patch much easier to read. llvm-svn: 197585
* Implement the MSABI and SysVABI calling conventions for Objective-C method ↵Aaron Ballman2013-12-181-2/+9
| | | | | | declarations. This appears to be an omission from r189644. llvm-svn: 197584
* Remove OpenCL-specific type keywords and specifiersAlp Toker2013-12-187-135/+19
| | | | | | | | | | | | | | | This commit kills off custom type specifier and keyword handling of OpenCL C data types. Although the OpenCL spec describes them as keywords, we can handle them more elegantly as predefined types. This should provide better error correction and code completion as well as simplifying the implementation. The primary intention is however to simplify the C/C++ parser and save some packed bits on AST structures that had been extended in r170432 just for OpenCL. llvm-svn: 197578
* Add -f64:32:64 to the darwin ppc32 DataLayout.Rafael Espindola2013-12-181-4/+2
| | | | | | A f64 inside a struct can be 32 bit aligned on darwin. llvm-svn: 197577
* clang-format: Fix indentation corner case.Daniel Jasper2013-12-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | Before: aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); After: aaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); aaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); Probably still not ideal, but should be a step into the right direction. llvm-svn: 197557
* [OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and ↵Alexey Bataev2013-12-183-39/+60
| | | | | | parens llvm-svn: 197553
* clang-format: Fix ObjC method expr in binary expressions.Daniel Jasper2013-12-181-1/+1
| | | | | | | | | | | | | | Before: bool a = ([aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaa || [aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaaaaa); After: bool a = ([aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaa || [aaaaaaaa aaaaa] == aaaaaaaaaaaaaaaaaaaa); This fixes llvm.org/PR18271. llvm-svn: 197552
* Print the 'p' specification before the 'i' specification.Rafael Espindola2013-12-181-2/+1
| | | | | | No functionality change. llvm-svn: 197548
OpenPOWER on IntegriCloud