summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Add missing initialization found due to a valgrind false positive.Richard Smith2014-07-211-1/+1
| | | | | | | | This field is never inspected in the object state initialized by this constructor; however, initializing it seems reasonable, since it has a meaningful value. llvm-svn: 213499
* Cleanup comparisons to VariableArrayType::Static for non-VLAsHal Finkel2014-07-191-1/+1
| | | | | | | The enum is part of ArrayType, so there is no functional change, but comparing to ArrayType::Static for non-VLAs makes more sense. llvm-svn: 213446
* TypePrinter should not ignore IndexTypeCVRQualifiers on constant-sized arraysHal Finkel2014-07-191-0/+4
| | | | | | | | | | C99 array parameters can have index-type CVR qualifiers, and the TypePrinter should print them when present (and we were not for constant-sized arrays). Otherwise, we'd drop the restrict in: int foo(int a[restrict static 3]) { ... } llvm-svn: 213445
* [MS-ABI] Assign SEH handler indices to __try blocksWarren Hunt2014-07-191-12/+10
| | | | | | | | | Assigns indices to try blocks. These indices will used in constructing tables that the mscrt function __except_handler3 reads during SEH. Testing will occur once we actually emit the tables, in a subsequent patch. llvm-svn: 213437
* TypePrinter should not omit the static keyword in array parameter declaratorsHal Finkel2014-07-181-2/+7
| | | | | | | | | | | In C99, an array parameter declarator might have the form: direct-declarator '[' 'static' type-qual-list[opt] assign-expr ']' and when the size of the array is a constant, don't omit the static keyword when printing the type. Also, in the VLA case, put a space after the static keyword (some assignment expression must follow it). llvm-svn: 213424
* Objective-C. Patch to warn if the result of calling a property getter Fariborz Jahanian2014-07-181-6/+9
| | | | | | | | is unused (this is match behavior when property-dot syntax is used to use same getter). rdar://17514245 Patch by Anders Carlsson with minor refactoring by me. llvm-svn: 213423
* [OPENMP] Initial parsing and sema analysis for 'taskwait' directive.Alexey Bataev2014-07-183-0/+23
| | | | llvm-svn: 213363
* [OPENMP] Initial parsing and sema analysis for 'barrier' directive.Alexey Bataev2014-07-183-0/+23
| | | | llvm-svn: 213360
* [OPENMP] Initial parsing and sema analysis of 'taskyield' directive.Alexey Bataev2014-07-183-1/+25
| | | | llvm-svn: 213355
* MS compatibility: always emit dllexported in-class initialized static data ↵Hans Wennborg2014-07-171-1/+14
| | | | | | | | | | | | | | members (PR20140) This makes us emit dllexported in-class initialized static data members (which are treated as definitions in MSVC), even when they're not referenced. It also makes their special linkage reflected in the GVA linkage instead of getting massaged in CodeGen. Differential Revision: http://reviews.llvm.org/D4563 llvm-svn: 213304
* Handle __assume in the VoidExprEvaluatorHal Finkel2014-07-171-0/+10
| | | | | | | | This is a follow-up to an IRC conversation with Richard last night; __assume does not evaluate its argument, and so the argument should not contribute to whether (__assume(e), constant) can be used where a constant is required. llvm-svn: 213267
* [OPENMP] Initial parsing and sema analysis of 'mergeable' clause.Alexey Bataev2014-07-172-0/+6
| | | | llvm-svn: 213262
* [OPENMP] Initial support for parsing and sema analysis of 'untied' clause.Alexey Bataev2014-07-172-0/+6
| | | | llvm-svn: 213257
* [OPENMP] Parsing/Sema analysis of directive 'master'Alexander Musman2014-07-173-0/+29
| | | | llvm-svn: 213237
* [OPENMP] Initial parsing and sema analysis for 'final' clause.Alexey Bataev2014-07-172-0/+11
| | | | llvm-svn: 213232
* Track the difference betweenRichard Smith2014-07-171-1/+8
| | | | | | | | | | | | -- a constructor list initialization that unpacked an initializer list into constructor arguments and -- a list initialization that created as std::initializer_list and passed it as the first argument to a constructor in the AST. Use this flag while instantiating templates to provide the right semantics for the resulting initialization. llvm-svn: 213224
* MS ABI: Padding injected between empty vbases doesn't up required alignDavid Majnemer2014-07-171-1/+1
| | | | | | Only alignment is changed, not required alignment. llvm-svn: 213217
* Objective-C. Changes per A. Ballman's commentFariborz Jahanian2014-07-161-10/+12
| | | | | | for my last patch. // rdar://17631257 llvm-svn: 213185
* Simplify memory management in NestedNameSpecifierLocBuilder.Serge Pavlov2014-07-161-8/+4
| | | | | | | With this change the memory of buffer in NestedNameSpecifierLocBuilder is allocated in one place. It also prevents from allocation of tiny blocks. llvm-svn: 213178
* Objective-C. Introducing __attribute__((objc_runtime_name("runtimename"))Fariborz Jahanian2014-07-161-0/+23
| | | | | | | | | to be applied to class or protocols. This will direct IRGen for Objective-C metadata to use the new name in various places where class and protocol names are needed. rdar:// 17631257 llvm-svn: 213167
* MS ABI: Up the required alignment after inserting padding between vbasesDavid Majnemer2014-07-161-1/+3
| | | | | | | | | | We would correctly insert sufficiently aligned padding between vbases when our leading base was empty, however we would neglect to increase the required alignment of the most derived class. This fixes PR20315. llvm-svn: 213123
* AST: Convert a SmallPtrSet to a SmallPtrSetImpl in RecordLayoutBuilderDavid Majnemer2014-07-161-4/+4
| | | | | | No functionality changed, it just makes the code a little less brittle. llvm-svn: 213122
* AST: Cleanup RecordLayoutBuilderDavid Majnemer2014-07-161-90/+77
| | | | | | | | | | | No functionality changed, just some cleanups: - Switch some loops to range-based for. - Name some iterators with a more creative name than "I". - Reduce dependence on auto. Does RD->bases() give you a list of CXXBaseSpecifiers or CXXRecordDecls? It's more clear to just say which upfront. llvm-svn: 213121
* Added the pack_elements range accessor. Refactoring some for loops to use ↵Aaron Ballman2014-07-156-32/+19
| | | | | | range-based for loops instead. No functional changes intended. llvm-svn: 213095
* AST: Don't walk all redeclarations when looking for a uuid attrDavid Majnemer2014-07-151-6/+4
| | | | | | No funcionality changed, just a simplification of the existing code. llvm-svn: 213044
* AST: Fix __uuidof for template specializationsDavid Majnemer2014-07-141-5/+5
| | | | | | | | | | | While we previously supported __uuidof applied to a template specialization, we would only find the uuid attribute if it was applied to the template argument. We would erroneously ignore the uuid attribute on the specialization itself. This is required to parse Windows Runtime C++ Template Library headers. llvm-svn: 213016
OpenPOWER on IntegriCloud