summaryrefslogtreecommitdiffstats
path: root/lib/Sema/TypeLocBuilder.h
Commit message (Collapse)AuthorAgeFilesLines
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215557 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'. Sema edition.Craig Topper2014-05-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209613 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-commit r183466 with a fix to make the TypeLoc casting machinery workEli Friedman2013-06-071-68/+18
| | | | | | | | | | | correctly in the presence of qualified types. (I had to change the unittest because it was trying to cast a QualifiedTypeLoc to TemplateSpecializationTypeLoc.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183563 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverts r183466: "Perform dynamic alignment computations..."Manuel Klimek2013-06-071-18/+68
| | | | | | | | | This introduces bugs in TemplateSpecializationTypeLoc's angle bracket locations. Regression test follows in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183513 91177308-0d34-0410-b5e6-96231b3b80d8
* Perform dynamic alignment computations so that the data in TypeLocs isEli Friedman2013-06-071-68/+18
| | | | | | | | | | | | | | | | | correctly aligned. Not performing such computations led to misaligned loads, which crash on some platforms and are generally bad on other platforms. The implementation of TypeLocBuilder::pushImpl is rather messy; code using TypeLocBuilder accidentally assumes that partial TypeLocs are laid out like a complete TypeLoc. As a followup, I intend to work on fixing the TypeLocBuilder API to avoid exposing partial TypeLocs; this should substantially simplify the implemementation. Fixes PR16144. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183466 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace TypeLoc llvm::cast support to be well-defined.David Blaikie2013-02-181-3/+3
| | | | | | | | | | | | | | The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175462 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more unnecessary #include <llvm/ADT/SmallVector.h>Francois Pichet2011-06-201-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133418 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C++ ARC: eliminate the utterly unjustified loophole thatDouglas Gregor2011-06-171-8/+10
| | | | | | | | | | | | silently dropped ownership qualifiers that were being applied to ownership-qualified, substituted type that was *not* a substituted template type parameter. We now provide a diagnostic in such cases, and recover by dropping the added qualifiers. Document this behavior in the ARC specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133309 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-ARC++: infer template type arguments ofDouglas Gregor2011-06-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ownership-unqualified retainable object type as __strong. This allows us to write, e.g., std::vector<id> and we'll infer that the vector's element types have __strong ownership semantics, which is far nicer than requiring: std::vector<__strong id> Note that we allow one to override the ownership qualifier of a substituted template type parameter, e.g., given template<typename T> struct X { typedef __weak T type; }; X<id> is treated the same as X<__strong id>. At instantiation type, the __weak in "__weak T" overrides the (inferred or specified) __strong on the template argument type, so that we can still provide metaprogramming transformations. This is part of <rdar://problem/9595486>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133303 91177308-0d34-0410-b5e6-96231b3b80d8
* Automatic Reference Counting.John McCall2011-06-151-0/+9
| | | | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove crash recovery cleanups from TypeLocBuilder. They were a bit error ↵Ted Kremenek2011-03-221-7/+1
| | | | | | prone, only hit in rare cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128058 91177308-0d34-0410-b5e6-96231b3b80d8
* Recovery memory from TypeLocBuilders during crashes.Ted Kremenek2011-03-191-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127932 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach CXXScopeSpec to handle the extension of a nested-name-specifierDouglas Gregor2011-02-241-0/+13
| | | | | | | | | | | with another component in the nested-name-specifiers, updating its representation (a NestedNameSpecifier) and source-location information (currently a SourceRange) simultaneously. This is groundwork for adding source-location information to nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126346 91177308-0d34-0410-b5e6-96231b3b80d8
* Make TypeLocBuilder an implementation detail of Sema. Nobody else should be ↵Douglas Gregor2010-12-021-0/+180
using it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120628 91177308-0d34-0410-b5e6-96231b3b80d8