summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Sema: Parenthesized bound destructor member expressions can be calledDavid Majnemer2015-02-253-15/+17
| | | | | | | | | We would wrongfully reject (a.~A)() in both the destructor and pseudo-destructor cases. This fixes PR22668. llvm-svn: 230512
* Whitespace.NAKAMURA Takumi2015-02-251-1/+1
| | | | llvm-svn: 230478
* Revert r230448, "Reland r230314 "Fix codegen for virtual methods that are ↵NAKAMURA Takumi2015-02-251-5/+1
| | | | | | (re-) exported from multiple modules."", since I have reverted r230446. llvm-svn: 230477
* Whitespace.NAKAMURA Takumi2015-02-251-8/+8
| | | | llvm-svn: 230475
* Revert r230446, "MS ABI: Try to respect external AST source record layouts"NAKAMURA Takumi2015-02-251-130/+60
| | | | | | It fails on Clang::PCH/headersearch.cpp for targeting msvc. llvm-svn: 230474
* Reland r230314 "Fix codegen for virtual methods that are (re-) exported from ↵Reid Kleckner2015-02-251-1/+5
| | | | | | | | | | multiple modules." This reverts the revert from commit r230406. The changes in r230445 and r230446 make the test pass on Windows now. llvm-svn: 230448
* MS ABI: Try to respect external AST source record layoutsReid Kleckner2015-02-251-60/+130
| | | | | | | | Covered by existing tests in test/CodeGen/override-layout.c and test/CodeGenCXX/override-layout.cpp. Seriously, they found real bugs in my code. :) llvm-svn: 230446
* Add missing MD canonicalization to MS vtable builderReid Kleckner2015-02-251-0/+1
| | | | llvm-svn: 230445
* Revert r230314, "Fix codegen for virtual methods that are (re-) exported ↵NAKAMURA Takumi2015-02-251-5/+1
| | | | | | | | | | from multiple modules." It crashes for targeting (i686|x86_64)-win32. clang: clang/lib/AST/VTableBuilder.cpp:142: {anonymous}::FinalOverriders::OverriderInfo {anonymous}::FinalOverriders::getOverrider(const clang::CXXMethodDecl*, clang::CharUnits) const: Assertion `OverridersMap.count(std::make_pair(MD, BaseOffset)) && "Did not find overrider!"' failed. llvm-svn: 230406
* MS extensions: Properly diagnose address of MS property declReid Kleckner2015-02-241-3/+4
| | | | | | | | | | | | Summary: Fixes PR22671. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7863 llvm-svn: 230362
* Fix codegen for virtual methods that are (re-) exported from multiple modules.Manuel Klimek2015-02-241-1/+5
| | | | | | | Fixes multiple crashes where a non-canonical decl would be used as key in a lookup. llvm-svn: 230314
* [modules] Ensure we've imported all declarations of a template beforeRichard Smith2015-02-241-3/+15
| | | | | | | attempting to lazily deserialize its specializations; otherwise, there might be pending specializations that we don't know about yet. llvm-svn: 230301
* Refactor *TemplateDecl::addSpecialization to reduce duplication and add someRichard Smith2015-02-241-32/+36
| | | | | | more asserts. llvm-svn: 230296
* Cleanup: remove artificial division between lookup results and const lookupRichard Smith2015-02-214-16/+16
| | | | | | | results. No-one was ever modifying a lookup result, and it would not be reasonable to do so. llvm-svn: 230123
* Revert r167816 and replace it with a proper fix for the issue: do notRichard Smith2015-02-212-16/+19
| | | | | | | invalidate lookup_iterators and lookup_results for some name within a DeclContext if the lookup results for a *different* name change. llvm-svn: 230121
* Implement Control Flow Integrity for virtual calls.Peter Collingbourne2015-02-202-0/+25
| | | | | | | | | | | | | | | This patch introduces the -fsanitize=cfi-vptr flag, which enables a control flow integrity scheme that checks that virtual calls take place using a vptr of the correct dynamic type. More details in the new docs/ControlFlowIntegrity.rst file. It also introduces the -fsanitize=cfi flag, which is currently a synonym for -fsanitize=cfi-vptr, but will eventually cover all CFI checks implemented in Clang. Differential Revision: http://reviews.llvm.org/D7424 llvm-svn: 230055
* Itanium ABI: Pack expansions change the arity of expressions to unknownDavid Majnemer2015-02-191-3/+8
| | | | llvm-svn: 229918
* CXXNameMangler::mangleUnresolvedPrefix(): Prune an obsolete \param, ↵NAKAMURA Takumi2015-02-191-2/+0
| | | | | | according to r229809. [-Wdocumentation] llvm-svn: 229823
* Itanium ABI: Don't pass nullptr to a bool argumentDavid Majnemer2015-02-191-1/+1
| | | | llvm-svn: 229822
* Itanium ABI: Properly qualify the destructor-nameDavid Majnemer2015-02-191-206/+169
| | | | | | | We didn't have enough qualificaiton before the scope specifier and we had too much qualification in the destructor name itself. llvm-svn: 229809
* Itanium ABI: Write a character instead of a string literalDavid Majnemer2015-02-181-1/+1
| | | | | | No functional change intended. llvm-svn: 229726
* Itanium ABI: Properly mangle extern "C" template argumentsDavid Majnemer2015-02-181-0/+8
| | | | | | | | | extern "C" declarations should be considered like global declarations for mangling purposes. Differential Revision: http://reviews.llvm.org/D7718 llvm-svn: 229724
* Change representation of member function pointers for MIPS targetsZoran Jovanovic2015-02-181-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D7148 llvm-svn: 229680
* Itanium ABI: Mangle <mangled-name> according to the ABIDavid Majnemer2015-02-181-12/+6
| | | | | | | | | | | | | | | We attempted to be compatible with GCC's buggy mangling for templates with a declaration for a template argument. However, we weren't completely successful in copying their bug in cases like: char foo; template <char &C> decltype(C) f() { return foo; }; template char &f<foo>(); Instead, just follow the ABI specification. This fixes PR22621. llvm-svn: 229644
* Itanium ABI: Improve our mangling of <destructor-name>David Majnemer2015-02-181-42/+90
| | | | | | | | | | | | | Our mangling of <destructor-name> wasn't quite right: we'd introduce mangling substitutions where one shouldn't be possible. We also didn't correctly handle the case where the destroyed type was not dependent but still a TemplateSpecializationType. N.B. There isn't a mangling for a template-template parameter showing up as the destroyed type. We do the 'obvious' thing and mangle the index of the parameter. llvm-svn: 229615
* Prefer SmallVector::append/insert over push_back loops. Clang edition.Benjamin Kramer2015-02-171-3/+2
| | | | | | Same functionality, but hoists the vector growth out of the loop. llvm-svn: 229508
* [Objctive-C sema]. Do not do the unused-getter-return-valueFariborz Jahanian2015-02-161-3/+1
| | | | | | | warning when property getter is used in direct method call and return value of property is unused. rdar://19773512 llvm-svn: 229458
* Enhance printing SizeOfPackExpr in dump.Serge Pavlov2015-02-161-0/+8
| | | | llvm-svn: 229428
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-151-5/+4
| | | | | | requiring the macro. NFC; Clang edition. llvm-svn: 229339
* Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the ↵Aaron Ballman2015-02-151-1/+1
| | | | | | macro. NFC; Clang edition. llvm-svn: 229336
* ItaniumMangle: Correctly mangle <base-unresolved-name>David Majnemer2015-02-141-25/+63
| | | | | | | | | | We had two bugs: - We were missing the "on" prefix for unresolved operators. - We didn't handle the mangling of destructors at all. This fixes PR22584. llvm-svn: 229255
* DR1748: the reserved placement allocation functions have undefined behavior ifRichard Smith2015-02-141-2/+3
| | | | | | | they're given a null pointer as an argument, so we do not need to emit null checks on their results. llvm-svn: 229213
* CXXInheritance: Modernize removal of hidden virtual base class decls.Benjamin Kramer2015-02-111-76/+42
| | | | | | NFC. llvm-svn: 228864
* [modules] When determining whether a name from a module replaces a name weRichard Smith2015-02-102-53/+101
| | | | | | | | | already have, check whether the name from the module is actually newer than the existing declaration. If it isn't, we might (say) replace a visible declaration with an injected friend, and thus make it invisible (or lose a default argument or an array bound). llvm-svn: 228661
* [modules] Treat friend declarations that are lexically within a dependentRichard Smith2015-02-071-0/+4
| | | | | | | context as anonymous for merging purposes. They can't be found by their names, so we merge them based on their position within the surrounding context. llvm-svn: 228485
* [modules] Don't accidentally trigger deserialization from ↵Richard Smith2015-02-071-6/+6
| | | | | | DeclContext::noload_lookup. llvm-svn: 228475
* Update APIs that return a pair of iterators to return an iterator_range instead.Benjamin Kramer2015-02-062-14/+10
| | | | | | Convert uses of those APIs into ranged for loops. NFC. llvm-svn: 228404
* PR22465: when performing list-initialization for a class type C, if we see anRichard Smith2015-02-052-7/+21
| | | | | | | | | | initializer of the form {x}, where x is of type C or a type derived from C, perform *non-list* initialization of the entity from x, but create a CXXConstructExpr that knows that we used list-initialization syntax. Plus some fixes to ensure we mangle correctly in this and related cases. llvm-svn: 228276
* Various fixes to mangling of list-initialization.Richard Smith2015-02-052-17/+64
| | | | llvm-svn: 228274
* Catch more cases when diagnosing integer-constant-expression overflows.Josh Magee2015-02-041-2/+6
| | | | | | | | | When visiting AssignmentOps, keep evaluating after a failure (when possible) in order to identify overflow in subexpressions. Differential Revision: http://reviews.llvm.org/D1238 llvm-svn: 228202
* Allow to specify multiple -fsanitize-blacklist= arguments.Alexey Samsonov2015-02-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Allow user to provide multiple blacklists by passing several -fsanitize-blacklist= options. These options now don't override default blacklist from Clang resource directory, which is always applied (which fixes PR22431). -fno-sanitize-blacklist option now disables all blacklists that were specified earlier in the command line (including the default one). This change depends on http://reviews.llvm.org/D7367. Test Plan: regression test suite Reviewers: timurrrr Subscribers: cfe-commits, kcc, pcc Differential Revision: http://reviews.llvm.org/D7368 llvm-svn: 228156
* Generalize r228066 to give all implicit global allocation functions default ↵Larisse Voufo2015-02-041-6/+1
| | | | | | visibility. llvm-svn: 228107
* PR22419: Give implicit sized deallocation functions default visibilityLarisse Voufo2015-02-031-1/+6
| | | | llvm-svn: 228066
* AST: Hoist RT->getDecl() into a variableDavid Majnemer2015-02-031-2/+3
| | | | llvm-svn: 227953
* MS ABI: Records with required alignment can't have common linkageDavid Majnemer2015-02-031-0/+1
| | | | | | This fixes PR22441. llvm-svn: 227950
* The prefix 'Ms-' should be 'MS-'David Majnemer2015-02-021-1/+1
| | | | | | | Clang is otherwise consistent that Microsoft be abbreviated as MS, not Ms. llvm-svn: 227842
* Reimplement iterator wrappers on top of llvm::iterator_adaptor_base.Benjamin Kramer2015-02-011-4/+2
| | | | | | Eliminates a ton of boilerplate proxying the iterator methods. NFC. llvm-svn: 227764
* Teach AST printing to not print whitespace inside {} and () for initialization,Richard Smith2015-01-301-7/+7
| | | | | | to match LLVM's preferred style. llvm-svn: 227545
* PR22367: Don't forget to create a CXXFunctionalCastExpr aroundRichard Smith2015-01-281-4/+14
| | | | | | | | | list-initialization that gets converted to some form other than an InitListExpr. CXXTemporaryObjectExpr is a special case here, because it represents a fused CXXFunctionalCastExpr + CXXConstructExpr. That, in itself, is probably a design error... llvm-svn: 227377
* Remove support for pnaclcall attributeDerek Schuff2015-01-282-6/+0
| | | | | | | | | | | | | | | | | | Summary: It was used for interoperability with PNaCl's calling conventions, but it's no longer needed. Also Remove NaCl*ABIInfo which just existed to delegate to either the portable or native ABIInfo, and remove checkCallingConvention which was now a no-op override. Reviewers: jvoung Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D7206 llvm-svn: 227362
OpenPOWER on IntegriCloud