summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* Range'ify some for loops over RecordDecl::fields()Hans Wennborg2014-08-213-10/+9
| | | | | | No functionality change. llvm-svn: 216183
* C++1y is now C++14!Aaron Ballman2014-08-193-12/+12
| | | | | | Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording. llvm-svn: 215982
* [OPENMP] Extract common superclass from all the loop directives. No ↵Alexander Musman2014-08-191-3/+7
| | | | | | functional changes (having common superclass is convenient for future loop directives CodeGen implementation) llvm-svn: 215975
* MS ABI: Update alias template mangling for VC "14" CTP 3David Majnemer2014-08-191-3/+2
| | | | | | | | MSVC "14" CTP 3 has fixed it's mangling for alias templates when used as template-template arguments; update clang to be compatible with this mangling. llvm-svn: 215972
* Make sure CallExpr::getLocStart doesn't segfaultKeno Fischer2014-08-151-2/+2
| | | | | | | | | | | | | | | | | Summary: When the CallExpr passed to Sema::ConvertArgumentsForCall has all default parameters, and the number of actual arguments passed is zero, this function will segfault in the call to Call->getLocStart() if the Callee has an invalid getLocStart(), the reason being that since ConvertArgumentsForCall has set the correct number of arguments, but has not filled them in yet, getLocStart() will try to access the first (not yet existent) argument and thus segfaults. This fixes that by making getLocStart return an invalid source location if the queried argument is NULL rather than segfaulting. Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4917 llvm-svn: 215686
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* [modules] When performing a lookup into a namespace, ensure that any laterRichard Smith2014-08-132-1/+6
| | | | | | | | | | redefinitions of that namespace have already been loaded. When writing out the names in a namespace, if we see a name that is locally declared and had imported declarations merged on top of it, export the local declaration as the lookup result, because it will be the most recent declaration of that entity in the redeclaration chain of an importer of the module. llvm-svn: 215518
* MS ABI: Mangle this qualifiers on function typesDavid Majnemer2014-08-121-9/+14
| | | | | | | | | | | C++11 allows this qualifiers to exist on function types when used in template arguments. Previously, I believed it wasn't possible because MSVC rejected declarations like: S<int () const &> s; However, it turns out MSVC properly allows them in using declarations; updated clang to be compatible with this mangling. llvm-svn: 215464
* Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dumpRichard Smith2014-08-111-5/+23
| | | | | | | | anyway. If -ast-dump *is* also provided, then dump the AST declarations as well as the lookup results. This is invaluable for cross-correlating the lookup information with the declarations actually found. llvm-svn: 215393
* Add some FIXMEs.Richard Smith2014-08-111-0/+2
| | | | llvm-svn: 215375
* Fix PR20444 -- wrong number of vftable slots created when return adjustment ↵Timur Iskhodzhanov2014-08-101-30/+28
| | | | | | | | thunks are needed Reviewed at http://reviews.llvm.org/D4822 llvm-svn: 215312
* Fix PR20479 -- missing vftable slots in case of virtual inheritance vs ↵Timur Iskhodzhanov2014-08-091-2/+9
| | | | | | | | return adjusting thunks Reviewed at http://reviews.llvm.org/D4829 llvm-svn: 215285
* Objective-C ARC. Adding declarations for Objective-C'sFariborz Jahanian2014-08-061-0/+17
| | | | | | new APIs for literals. nfc. wip. rdar://17554063 llvm-svn: 214993
* Objective-C ARC. First patch toward generating new APIsFariborz Jahanian2014-08-061-4/+11
| | | | | | | for Objective-C's array and dictionary literals. rdar://17554063. This is wip. llvm-svn: 214983
* MS ABI: Mangle lambdas which are given the same mangling numberDavid Majnemer2014-08-061-4/+1
| | | | | | | | It is possible for lambdas to get the same mangling number because they may exist in different mangling contexts. To handle this correctly, mangle the context into the name as well. llvm-svn: 214947
* MS ABI: Mangle empty type parameter packs compatiblyDavid Majnemer2014-08-051-5/+18
| | | | | | | | | | | The MS mangling scheme apparently has separate manglings for type and non-type parameter packs when they are empty. Match template arguments with parameters during mangling; check the parameter to see if it was destined to hold type-ish things or nontype-ish things. Differential Revision: http://reviews.llvm.org/D4792 llvm-svn: 214932
* MS ABI: Make the alias template mangling more correctDavid Majnemer2014-08-051-1/+1
| | | | llvm-svn: 214847
* AST: Fix the mangling for unqualified-blocksDavid Majnemer2014-08-041-2/+2
| | | | | | | | | | | | | | | | CXXNameMangler::mangleUnqualifiedBlock believed that MangleContext::getBlockId returned something that used Itanium-style discriminator numbers. Discriminator numbers start their numberign from 1 and the first mangling that actually gets any sort of number mangled in is the second discriminator. However, Block IDs start from zero. The logic for omitting the mangling number did a ' > 1' instead of a ' > 0' comparison; this could potentially cause mangling conflicts. llvm-svn: 214699
* AST: Propagate 'AlignIsRequired' though many levels of typedefsDavid Majnemer2014-08-041-1/+3
| | | | | | | A typedef of a typedef should have AlignIsRequired if *either* typedef has an AlignAttr attached to it. llvm-svn: 214698
* Improving diagnostic source ranges for the nonnull attribute. Now it ↵Aaron Ballman2014-08-011-0/+7
| | | | | | highlights the attribute and the faulty nonpointer type when possible. llvm-svn: 214507
* Factor out exception specification information fromRichard Smith2014-07-314-49/+51
| | | | | | | | FunctionProtoType::ExtProtoInfo. Most of the users of these fields don't care about the other ExtProtoInfo bits and just want to talk about the exception specification. llvm-svn: 214450
* PR18097: Support initializing an _Atomic(T) from an object of C++ class type TRichard Smith2014-07-311-0/+5
| | | | | | | or a class derived from T. We already supported this when initializing _Atomic(T) from T for most (and maybe all) other reasonable values of T. llvm-svn: 214390
* AST: Simplify some codeDavid Majnemer2014-07-301-6/+7
| | | | | | | | | | Iterator invalidation issues already force us to do one lookup and one insert. Don't use the particular bit-pattern of the 'Align' field to determine whether or not we have already inserted into the TypeInfo DenseMap; instead ask for an iterator to the TypeInfo entry. llvm-svn: 214293
* MS ABI: Mangle alias templates used as template-template argumentsDavid Majnemer2014-07-301-3/+13
| | | | | | | | | | | | | A templated using declaration may be used as a template-template argument. Unfortunately, the VS "14" chooses '?' as the sole marker for the argument. This is problematic because it presupposes the possibility of using more than one template-aliases as arguments to the same template. This fixes PR20047. llvm-svn: 214290
* Simplify the code.Rafael Espindola2014-07-301-7/+6
| | | | | | Thanks to David Balkie for the suggestion. llvm-svn: 214286
* Fix a use after free bug.Rafael Espindola2014-07-301-5/+8
| | | | llvm-svn: 214281
* MS ABI: Consider alignment attributes on typedefs for layoutDavid Majnemer2014-07-302-45/+54
| | | | | | | | | | | | | | | | | | | The MS ABI has a notion of 'required alignment' for fields; this alignment supercedes pragma pack directives. MSVC takes into account alignment attributes on typedefs when determining whether or not a field has a certain required alignment. Do the same in clang by tracking whether or not we saw such an attribute when calculating the type's bitwidth and alignment. This fixes PR20418. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4714 llvm-svn: 214274
* If a template argument is non-evaluable expression, use the profile ID to seeRichard Trieu2014-07-261-7/+8
| | | | | | if the two arguments are equal. llvm-svn: 214008
* Improve -UNDEBUG binary size. We don't need a different assert fail message forRichard Smith2014-07-261-2/+2
| | | | | | each different enum value here. llvm-svn: 213996
* Revert r213437Warren Hunt2014-07-251-10/+12
| | | | | | | We no longer plan to use __except_hander3 and rather use custom personality functions per __try block. llvm-svn: 213971
* Pass the PrintingPolicy when converting types to strings in template typeRichard Trieu2014-07-251-5/+6
| | | | | | | diffing. This removes extra "struct"/"class" in the type names and gives "bool" instead of "_Bool" for booleans. llvm-svn: 213912
* Print "(default)" for default template template arguments to match theRichard Trieu2014-07-241-0/+1
| | | | | | printing of other types. llvm-svn: 213902
* [OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' ↵Alexey Bataev2014-07-242-0/+6
| | | | | | directive. llvm-svn: 213846
* [OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' ↵Alexey Bataev2014-07-242-0/+6
| | | | | | directive. llvm-svn: 213842
* Add support for nullptr template arguments to template type diffing.Richard Trieu2014-07-241-31/+107
| | | | llvm-svn: 213840
* Replace r213816's fix with a different one. It's not meaningful to callRichard Smith2014-07-231-3/+2
| | | | | | | isOnePastTheEnd on an invalid designator, so assert and push the check into the one caller that wasn't already checking. llvm-svn: 213820
* Add a missing Invalid check to SubobjectDesignator::isOnePastEnd()Reid Kleckner2014-07-231-0/+2
| | | | | | | | | | | The class seems to have an invariant that Entries is non-empty if Invalid is false. It appears this method was previously private, and all internal uses checked Invalid. Now there is an external caller, so check Invalid to avoid array OOB underflow. Fixes PR20420. llvm-svn: 213816
* AArch64: update Clang for merged arm64/aarch64 triples.Tim Northover2014-07-231-3/+1
| | | | | | | | | | | | | | The main subtlety here is that the Darwin tools still need to be given "-arch arm64" rather than "-arch aarch64". Fortunately this already goes via a custom function to handle weird edge-cases in other architectures, and it tested. I removed a few arm64_be tests because that really isn't an interesting thing to worry about. No-one using big-endian is also referring to the target as arm64 (at least as far as toolchains go). Mostly they date from when arm64 was a separate target and we *did* need a parallel name simply to test it at all. Now aarch64_be is sufficient. llvm-svn: 213744
* [OPENMP] Initial parsing and sema analysis for 'update' clause of 'atomic' ↵Alexey Bataev2014-07-232-0/+6
| | | | | | directive. llvm-svn: 213735
* [OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' ↵Alexey Bataev2014-07-232-0/+4
| | | | | | directive. llvm-svn: 213728
* AST printer: fix double space before base class with no access specifier.Richard Smith2014-07-231-2/+4
| | | | llvm-svn: 213719
* When pretty-printing a declaration of a pack, put the ellipsis before the nameRichard Smith2014-07-231-12/+18
| | | | | | | | being declared, not at the end. When pretty-printing a non-type template parameter, put the name of the parameter in the middle of the type, not at the end. llvm-svn: 213718
* [OPENMP] Initial parsing and sema analysis for 'read' clause in 'atomic' ↵Alexey Bataev2014-07-232-0/+4
| | | | | | directive. llvm-svn: 213717
* [OPENMP] Initial parsing and sema analysis for 'atomic' directive.Alexey Bataev2014-07-223-0/+35
| | | | llvm-svn: 213639
* [OPENMP] Initial parsing and sema analysis for 'ordered' directive.Alexey Bataev2014-07-223-0/+29
| | | | llvm-svn: 213616
* Fix '&' printing for template arguments in parentheses in template diffing.Richard Trieu2014-07-221-3/+6
| | | | llvm-svn: 213613
* More gracefully handle parentheses in templare arguments in template diffing.Richard Trieu2014-07-221-1/+2
| | | | llvm-svn: 213611
* Fix a template diffing problem were an '&' is unexpectedly printed inRichard Trieu2014-07-221-6/+26
| | | | | | a template argument. llvm-svn: 213609
* [OPENMP] Initial parsing and sema analysis for 'flush' directive.Alexey Bataev2014-07-213-0/+61
| | | | llvm-svn: 213512
* [OPENMP] Parsing/Sema of the OpenMP directive 'critical'.Alexander Musman2014-07-213-0/+35
| | | | llvm-svn: 213510
OpenPOWER on IntegriCloud