summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace avx-512 with avx512f to match llvm side and what gcc patches appear ↵Craig Topper2013-08-211-59/+56
| | | | | | to be using. llvm-svn: 188860
* Revert r188756 because some other changes snuck in with it.Craig Topper2013-08-201-56/+59
| | | | llvm-svn: 188757
* Add AVX-512 feature flag and knl cpu to clang.Craig Topper2013-08-201-59/+56
| | | | llvm-svn: 188756
* Fix name lookup with dependent using decls.Eli Friedman2013-08-201-0/+9
| | | | | | | | | | We previously mishandled UnresolvedUsingValueDecls in NamedDecl::declarationReplaces, which caused us to forget decls when there are multiple dependent using decls for the same name. Fixes PR16936. llvm-svn: 188737
* Make the version of Stmt::operator new that takes ASTContext* call the ↵Craig Topper2013-08-191-5/+0
| | | | | | ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions. llvm-svn: 188648
* Revert r188644 to unbreak buildbots.Craig Topper2013-08-181-0/+5
| | | | llvm-svn: 188645
* Remove Stmt::operator new that takes a ASTContext*. All callers use the ↵Craig Topper2013-08-181-5/+0
| | | | | | ASTContext& version. llvm-svn: 188644
* Remove throw() from Stmt::operator new so the compiler will omit the null ↵Craig Topper2013-08-181-2/+2
| | | | | | check on the result since ASTContext allocator won't return null. llvm-svn: 188641
* Make expression allocation methods use a 'const' reference to the ASTContext ↵Craig Topper2013-08-182-44/+48
| | | | | | since the underlying operator new only needs a const reference. llvm-svn: 188636
* Parse: Do not 'HandleTopLevelDecl' on templated functions.David Majnemer2013-08-161-7/+3
| | | | | | | | | | | | | | | | Summary: HandleTopLevelDecl on a templated function leads us to try and mangle it. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1412 llvm-svn: 188536
* Properly track l-paren of a CXXFucntionalCastExpr.Eli Friedman2013-08-152-5/+13
| | | | | | | | | | In addition to storing more useful information in the AST, this fixes a semantic check in template instantiation which checks whether the l-paren location is valid. Fixes PR16903. llvm-svn: 188495
* [Mips][msa] Add support for halfJack Carter2013-08-151-0/+5
| | | | | | | | | Add support for half (a.k.a. __fp16) in builtin descriptions. The second argument to BUILTIN() now accepts 'h' to represent half. Patch by Daniel Sanders llvm-svn: 188464
* [-cxx-abi microsoft] Mangle member pointers betterDavid Majnemer2013-08-151-14/+24
| | | | | | | | | | | | | | | | | | | | Summary: There were several things going wrong: - We mangled in useless qualifiers like "volatile void" return types. - We didn't propagate 64-bit pointer markers sufficiently. - We mangled qualifiers belonging to the pointee incorrectly. This fixes PR16844 and PR16848. Reviewers: rnk, whunt Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1353 llvm-svn: 188450
* Fix typo in comment.David Majnemer2013-08-131-1/+1
| | | | | | Thanks Kim Gräsman! llvm-svn: 188257
* [-cxx-abi microsoft] Mangle __uuidof correctly into template parametersDavid Majnemer2013-08-132-0/+43
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems that __uuidof introduces a global extern "C" declaration of type __s_GUID. However, our implementation of __uuidof does not provide such a declaration and thus must open-code the mangling for __uuidof in template parameters. This allows us to codegen scoped COM pointers and other such things. This fixes PR16836. Depends on D1356. Reviewers: rnk, cdavis5x, rsmith Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1357 llvm-svn: 188252
* variable templates updated for PCH serialization... Still working on test ↵Larisse Voufo2013-08-131-0/+10
| | | | | | cases... llvm-svn: 188249
* [-cxx-abi microsoft] Mangle TemplateArgument::Declaration for referencesDavid Majnemer2013-08-131-2/+4
| | | | | | | | | | | | | | | | Summary: Properly mangle declarations showing up in template arguments that are reference parameters. Fun-fact: undname cannot handle these! Reviewers: rnk, cdavis5x Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1356 llvm-svn: 188245
* Fix pretty-printing for unnamed unions.Eli Friedman2013-08-122-0/+4
| | | | | | | This is just a couple of minor fixes to account for the existence of ElaboratedType. llvm-svn: 188209
* Added source locs for angled parentheses in class/var template partial specs.Enea Zaffanella2013-08-101-19/+11
| | | | llvm-svn: 188134
* Correctly profile CXXPseudoDestructorExprs.Eli Friedman2013-08-091-1/+8
| | | | | | CXXPseudoDestructorExprs may not contain a type. PR16852. llvm-svn: 188123
* Expose LambdaIntroducer::DefaultLoc in the AST's LambdaExpr.James Dennett2013-08-091-6/+10
| | | | | | | | | | | | | | | | | | | | | Summary: Source-centric tools need access to the location of a C++11 lambda expression's capture-default ('&' or '=') when it's present. It's possible for them to find it by re-lexing and re-implementing rules that Clang's parser has already applied, but the cost of storing the SourceLocation and making it available to them is 32 bits per LambdaExpr (a small delta, proportionally), and the simplification in client code is significant. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits, klimek, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1192 llvm-svn: 188121
* Revert "[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the ↵David Majnemer2013-08-091-1/+4
| | | | | | | | | | proper section" This commit reverts r188053. It is breaking the build bots. llvm-svn: 188055
* [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper sectionDavid Majnemer2013-08-091-4/+1
| | | | | | | | | | | | We mangled them like: L___uuid_12345678-1234-1234-1234-123456789abc We should've mangled them like: __GUID_12345678_1234_1234_1234_123456789abc Furthermore, they are external symbols. llvm-svn: 188053
* Implement [class.friend]p11's special name lookup rules for friend declarationsRichard Smith2013-08-091-8/+1
| | | | | | | | of local classes. We were previously handling this by performing qualified lookup within a function declaration(!!); replace it with the proper scope lookup. llvm-svn: 188050
* Fix alignof computation of large arrays on x86_64.Rafael Espindola2013-08-081-9/+4
| | | | | | | | | | | We were exposing the extra alignment given to large arrays. The new behavior matches gcc, which is a good thing since this is a gcc extension. Thanks to Joerg Sonnenberger for noticing it. While at it, centralize the method description in the .h file. llvm-svn: 187999
* Correctly allign arrays on 32 bit systems.Rafael Espindola2013-08-071-7/+8
| | | | | | | | | | | Before this patch we would align long long int big[1024]; to 4 bytes on 32 bit systems. The problem is that we were only looking at the element type when getLargeArrayMinWidth returned non zero. llvm-svn: 187897
* Patch to fix doxygen trailing comments for ObjectiveC methods.Fariborz Jahanian2013-08-071-1/+1
| | | | | | // rdar://14258334 llvm-svn: 187893
* Patch to fix doxygen trailing comments for ObjectiveC properties.Fariborz Jahanian2013-08-061-1/+2
| | | | | | // rdar://14258334 llvm-svn: 187835
* PR16755: When initializing or modifying a bitfield member in a constantRichard Smith2013-08-061-7/+48
| | | | | | expression, truncate the stored value to the size of the bitfield. llvm-svn: 187782
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-066-39/+587
| | | | | | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... llvm-svn: 187762
* [ms-cxxabi] Properly mangle member pointersDavid Majnemer2013-08-051-1/+9
| | | | | | | | | | There were three things missing from the original implementation: - We would omit the 'E' qualifier for members int 64-bit mode. - We would not exmaine the qualifiers in 'IsMember' mode. - We didn't generate the correct backref to the base class. llvm-svn: 187753
* [ms-cxxabi] Handle template-template argumentsDavid Majnemer2013-08-051-7/+10
| | | | | | | Template-template arguments appear to be a rather simple encoding of the template's templated tag type. llvm-svn: 187751
* [ms-cxxabi] Mangle nullptr template argumentsDavid Majnemer2013-08-051-2/+4
| | | | | | MSVC mangles nullptr template arguments identically to zero literals. llvm-svn: 187741
* AST: Treat inline function declarations in -fms-compatibility as if it were ↵David Majnemer2013-08-011-2/+3
| | | | | | | | in C++ when in C mode This essentially fixes PR16766. llvm-svn: 187586
* Make helper function static.Benjamin Kramer2013-08-011-2/+2
| | | | llvm-svn: 187574
* Silence unused variable warning in non-assert builds.Daniel Jasper2013-08-011-0/+1
| | | | llvm-svn: 187572
* AArch64: initial NEON supportTim Northover2013-08-011-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Ana Pazos - Completed implementation of instruction formats: AdvSIMD three same AdvSIMD modified immediate AdvSIMD scalar pairwise - Completed implementation of instruction classes (some of the instructions in these classes belong to yet unfinished instruction formats): Vector Arithmetic Vector Immediate Vector Pairwise Arithmetic - Initial implementation of instruction formats: AdvSIMD scalar two-reg misc AdvSIMD scalar three same - Intial implementation of instruction class: Scalar Arithmetic - Initial clang changes to support arm v8 intrinsics. Note: no clang changes for scalar intrinsics function name mangling yet. - Comprehensive test cases for added instructions To verify auto codegen, encoding, decoding, diagnosis, intrinsics. llvm-svn: 187568
* Fix assert when instantiating a default argument of a template defined in aRichard Smith2013-08-011-1/+4
| | | | | | module. llvm-svn: 187556
* Add MicrosoftVFTableContext to ASTTimur Iskhodzhanov2013-07-302-22/+929
| | | | llvm-svn: 187409
* [libclang] Remove comma from the blacklist of characters that prevent a ↵Argyrios Kyrtzidis2013-07-261-1/+1
| | | | | | | | | comment to be attached to a decl. It's common to use an availability function macro at the start of a decl. rdar://13965065 llvm-svn: 187230
* Documentation parsing: if typedef name is being declaredFariborz Jahanian2013-07-241-1/+7
| | | | | | | | via a macro, try using declaration's starting location. This is improvement over not having a valid location and dropping comment altogether. // rdar://14348912 llvm-svn: 187085
* C++1y: track object lifetime during constexpr evaluation, and don't allowRichard Smith2013-07-241-59/+170
| | | | | | | objects to be used once their lifetimes end. This completes the C++1y constexpr extensions. llvm-svn: 187025
* [ms-cxxabi] Emit linkonce complete dtors in TUs that need themReid Kleckner2013-07-221-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Peter Collingbourne's destructor patches. Prior to this change, clang was considering ?1 to be the complete destructor and the base destructor, which was wrong. This lead to crashes when clang tried to emit two LLVM functions with the same name. In this ABI, TUs with non-inline dtors might not emit a complete destructor. They are emitted as inline thunks in TUs that need them, and they always delegate to the base dtors of the complete class and its virtual bases. This change uses the DeferredDecls machinery to emit complete dtors as needed. Currently in clang try body destructors can catch exceptions thrown by virtual base destructors. In the Microsoft C++ ABI, clang may not have the destructor definition, in which case clang won't wrap the virtual virtual base destructor calls in a try-catch. Diagnosing this in user code is TODO. Finally, for classes that don't use virtual inheritance, MSVC always calls the base destructor (?1) directly. This is a useful code size optimization that avoids emitting lots of extra thunks or aliases. Implementing it also means our existing tests continue to pass, and is consistent with MSVC's output. We can do the same for Itanium by tweaking GetAddrOfCXXDestructor, but it will require further testing. Reviewers: rjmccall CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1066 llvm-svn: 186828
* Improve clarity/consistency of a few UsingDecl methods and related helpers.Enea Zaffanella2013-07-222-3/+3
| | | | | | | | | | | | No functionality change. In Sema helper functions: * renamed isTypeName as HasTypenameKeyword In UsingDecl: * renamed get/setUsingLocation to get/setUsingLoc * renamed is/setTypeName as has/setTypename llvm-svn: 186816
* Tighten up the set of operator new/operator delete calls we're permitted toRichard Smith2013-07-211-2/+48
| | | | | | | | | optimize, to follow the permissions granted in N3664. Under those rules, only calls generated by new-expressions and delete-expressions are permitted to be optimized, and direct calls to ::operator new and ::operator delete must be treated as normal calls. llvm-svn: 186799
* report unused-value warning also for warn_unused typesLubos Lunak2013-07-211-1/+10
| | | | llvm-svn: 186793
* If a default argument is a dependent type, get the real type from the desugaredRichard Trieu2013-07-201-3/+7
| | | | | | | template. Passing around dependent types can lead to integral arguments that cannot be evaluated. llvm-svn: 186757
* Fix bug in computing POD-for-layout.Eli Friedman2013-07-201-1/+1
| | | | | | | | | | | | A class with a field of non-POD-for-layout type is not POD-for-layout. This computation should not depend on whether the field is of POD type in the language sense. Fixes PR16537. Patch by Josh Magee. llvm-svn: 186741
* Make IgnoreParens() look through ChooseExprs.Eli Friedman2013-07-203-77/+28
| | | | | | | | | | | | | This is the same way GenericSelectionExpr works, and it's generally a more consistent approach. A large part of this patch is devoted to caching the value of the condition of a ChooseExpr; it's needed to avoid threading an ASTContext into IgnoreParens(). Fixes <rdar://problem/14438917>. llvm-svn: 186738
* Fix another place where clang check objc selector name instead of checking ↵Jean-Daniel Dupas2013-07-191-3/+1
| | | | | | | | | | | | the selector family Summary: In ARC mode, clang emits a warning if the result of an 'init' method is unused but miss cases where the method does not follows the Cocoa naming convention but is properly declared as an init family method. CC: cfe-commits, eli.friedman Differential Revision: http://llvm-reviews.chandlerc.com/D1163 llvm-svn: 186718
OpenPOWER on IntegriCloud