summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't print 'NULL TYPE' when dumping a delegating constructor.Richard Trieu2014-09-121-1/+5
| | | | llvm-svn: 217707
* patch to add missing warning on sizeof wrong parameterFariborz Jahanian2014-09-121-0/+3
| | | | | | | | for __builtin___strlcpy_chk/__builtin___strlcat_chk. Patch by Jacques Fortier with monir change by me and addition of test. rdar://18259539 llvm-svn: 217700
* MS ABI: The latest VC "14" CTP implements deleted virtual functionsDavid Majnemer2014-09-121-10/+1
| | | | | | | | | | | | Deleted virtual functions get _purecall inserted into the vftable. Earlier CTPs would simply stick nullptr in there. N.B. MSVC can't handle deleted virtual functions which require return adjusting thunks, they give an error that a deleted function couldn't be called inside of a compiler generated function. We get this correct by making the thunk have a __purecall entry as well. llvm-svn: 217654
* Objective-C. Under a special flag, -Wcstring-format-directive,Fariborz Jahanian2014-09-091-0/+13
| | | | | | | | off by default, issue a warning if %s directive is used in certain CF/NS formatting APIs, to assist user in deprecating use of such %s in these APIs. rdar://18182443 llvm-svn: 217467
* Add __builtin_assume and __builtin_assume_aligned using @llvm.assume.Hal Finkel2014-09-071-0/+2
| | | | | | | | | | | This makes use of the recently-added @llvm.assume intrinsic to implement a __builtin_assume(bool) intrinsic (to provide additional information to the optimizer). This hooks up __assume in MS-compatibility mode to mirror __builtin_assume (the semantics have been intentionally kept compatible), and implements GCC's __builtin_assume_aligned as assume((p - o) & mask == 0). LLVM now contains special logic to deal with assumptions of this form. llvm-svn: 217349
* [modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixesRichard Smith2014-09-031-2/+13
| | | | | | | merging of namespace aliases across modules and improves source fidelity. Incidentally also fixes PR20816. llvm-svn: 217103
* [modules] Use DeclContext::equals rather than == on DeclContext* whenRichard Smith2014-09-031-0/+5
| | | | | | | | | | determining whether a declaration is out of line, instead of assuming that the semantic and lexical DeclContext will be the same declaration whenever they're the same entity. This fixes behavior of declarations within merged classes and enums. llvm-svn: 217008
* Fix some cases where StringRef was being passed by const reference. Remove ↵Craig Topper2014-08-301-2/+2
| | | | | | const from some other StringRefs since its implicitly const already. llvm-svn: 216825
* Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor ↵Craig Topper2014-08-301-12/+5
| | | | | | and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. llvm-svn: 216824
* unique_ptrify SourceManager::createFileIDDavid Blaikie2014-08-291-1/+1
| | | | llvm-svn: 216715
* [C++11] Support for capturing of variable length arrays in lambda expression.Alexey Bataev2014-08-284-6/+43
| | | | | | Differential Revision: http://reviews.llvm.org/D4368 llvm-svn: 216649
* Objective-C. Change to method lookup rules to lookFariborz Jahanian2014-08-271-12/+15
| | | | | | | | | | into primary class's named categories before looking into their protocols. This is because categories are part of the public interface and , just as primary class, preference should be given to them before class (and category) protocols. // rdar://18013929 llvm-svn: 216610
* Update for LLVM api change.Rafael Espindola2014-08-271-2/+3
| | | | llvm-svn: 216585
* Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or ↵Craig Topper2014-08-274-10/+10
| | | | | | just letting them be implicitly created. llvm-svn: 216528
* Fix some cases were ArrayRefs were being passed by reference.Craig Topper2014-08-271-1/+1
| | | | llvm-svn: 216527
* Refactor one of the larger functions for Type Diffing into smaller functions.Richard Trieu2014-08-271-185/+215
| | | | | | No functionality change. llvm-svn: 216526
* Change a few methods to static methods. No functionality change.Richard Trieu2014-08-271-12/+15
| | | | llvm-svn: 216519
* Refactor the diagnostic DeclContext printing. No functionality change.Richard Trieu2014-08-271-10/+6
| | | | llvm-svn: 216517
* Objective-C modernization. Convert -initWithUTF8String messagingFariborz Jahanian2014-08-251-0/+4
| | | | | | with auto-boxing syntax for literals. rdar://18080352 llvm-svn: 216405
* Use range based for loops to avoid needing to re-mention SmallPtrSet size.Craig Topper2014-08-251-5/+3
| | | | llvm-svn: 216370
* Objective-C. Warn when @encode'ing provides an incompleteFariborz Jahanian2014-08-221-26/+39
| | | | | | | | type encoding because in certain cases, such as for vector types, because we still haven't designed encoding for them. rdar://9255564 llvm-svn: 216301
* Objective-C. Warn if user has made explicit callFariborz Jahanian2014-08-221-0/+5
| | | | | | | to +initilize as this results in an extra call to this method. rdar://16628028 llvm-svn: 216271
* [AArch64, inline-asm] Improve diagnostic that is printed when the size of aAkira Hatanaka2014-08-221-6/+40
| | | | | | | | | | | | | | | | | variable that has regiser constraint "r" is not 64-bit. General register operands are output using 64-bit "x" register names, regardless of the size of the variable, unless the asm operand is prefixed with the "%w" modifier. This surprises and confuses many users who aren't familiar with aarch64 inline assembly rules. With this commit, a note and fixit hint are printed which tell the users that they need modifier "%w" in order to output a "w" register instead of an "x" register. <rdar://problem/12764785> llvm-svn: 216260
* MS ABI: Don't use the Itanium scheme for numbering lambdasDavid Majnemer2014-08-224-48/+45
| | | | | | | | | | | The Itanium ABI will give out the same mangling number for two different lambdas if their call operators have different types. The MS ABI cannot do the same because it does not mangle the return type into it's lambdas. This fixes PR20719. llvm-svn: 216259
* 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
OpenPOWER on IntegriCloud