summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * Revert "Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't ↵David Blaikie2013-07-133-2/+27
| | | | | | | | | | | | | | | | | | | | | | compile"" This reverts commit b18b043a5a37f76803d89467e46bcac286c0ecae. Reapply with fix for the configure+make build (missing include of ASTContext.h). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186257 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile"David Blaikie2013-07-133-29/+2
| | | | | | | | | | | | | | | | | | This reverts commit r186253. This is failing to link under Configure+Make on the buildbots for reasons I don't immediately understand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186255 91177308-0d34-0410-b5e6-96231b3b80d8
| * PR16540: ASTVector::insert(Context, Iter, Element) doesn't compileDavid Blaikie2013-07-133-2/+29
| | | | | | | | | | | | | | | | | | Fix some uninstantiable code in ASTVector::insert. I've added a cheap-and-dirty compile test for this, because I don't have the time to figure out a nice way to get a real ASTContext to implement executable tests - but we probably should have them for this ADT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186253 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fixes a typo caught by Arthur O'DwyerFariborz Jahanian2013-07-131-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186249 91177308-0d34-0410-b5e6-96231b3b80d8
| * C++ modules: Don't call DeclContext::lookup when half-way through deserializingRichard Smith2013-07-135-18/+94
| | | | | | | | | | | | | | | | decls. That can reenter deserialization and explode horribly by trying to merge a declaration that we've not got very far through deserializing yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186236 91177308-0d34-0410-b5e6-96231b3b80d8
| * [ms-cxxabi] Don't consider function templates for name backrefsReid Kleckner2013-07-133-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They don't seem to be used for back references, presumably because a function template is unlikely to reoccur, while a class template name may reoccur as a type. This fixes a mangling issue for llvm::hash_combine() in Hashing.h. Reviewers: timurrrr Differential Revision: http://llvm-reviews.chandlerc.com/D1078 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186233 91177308-0d34-0410-b5e6-96231b3b80d8
| * ObjC migrator: More knobs for migratingFariborz Jahanian2013-07-131-3/+19
| | | | | | | | | | | | | | conforming protocols to each class. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186231 91177308-0d34-0410-b5e6-96231b3b80d8
| * ObjC migrator: early work for migrating implicitly conformingFariborz Jahanian2013-07-121-1/+30
| | | | | | | | | | | | | | protocols to classes. This is wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186220 91177308-0d34-0410-b5e6-96231b3b80d8
| * Changes so that a few tests do not fail when running under guarded malloc.Argyrios Kyrtzidis2013-07-126-15/+15
| | | | | | | | | | | | | | Guarded malloc emits some messages at the beginning in stderr when enabled. These messages caused a few tests to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186219 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use function attributes to pass along the stack protector buffer size ↵Bill Wendling2013-07-122-1/+2
| | | | | | | | | | | | instead of making it a target option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186218 91177308-0d34-0410-b5e6-96231b3b80d8
| * Compute 'this' correctly for block in lambda.Eli Friedman2013-07-122-8/+21
| | | | | | | | | | | | | | | | | | Using CurFuncDecl is both correct and simple compared to crawling the DeclContexts of the block. Fixes <rdar://problem/14415072>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186210 91177308-0d34-0410-b5e6-96231b3b80d8
| * Provide a better diagnostic and a fixit for a '.' or '->' before the left parenKaelyn Uhrain2013-07-123-1/+30
| | | | | | | | | | | | | | | | of a function call. This fixes PR5898 and means we now have a better diagnostic here than GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186208 91177308-0d34-0410-b5e6-96231b3b80d8
| * Unrevert r186040, reverted in r186185, with fix for PR16597.Richard Smith2013-07-128-28/+78
| | | | | | | | | | | | | | | | | | | | | | | | Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186199 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r186040 to fix PR16597 while Richard investigates what the bestChandler Carruth2013-07-128-66/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | fix is. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186185 91177308-0d34-0410-b5e6-96231b3b80d8
| * [analyzer] Treat nullPtrType as a location type.Anna Zaks2013-07-122-1/+7
| | | | | | | | | | | | Fixes PR16584 (radar://14415223). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186172 91177308-0d34-0410-b5e6-96231b3b80d8
| * fixes a typo caught by Jordan.Fariborz Jahanian2013-07-121-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186171 91177308-0d34-0410-b5e6-96231b3b80d8
| * Objective-C: Produce gcc compatible encoding ofFariborz Jahanian2013-07-122-0/+32
| | | | | | | | | | | | | | | | ivar type in meta-data while preventing recursive encoding in a corner case. // rdar://14408244 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186169 91177308-0d34-0410-b5e6-96231b3b80d8
| * [scan-build] Add missing comma to ccc-analyzer.Jordan Rose2013-07-121-1/+1
| | | | | | | | | | | | Thanks, Dmitry! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186167 91177308-0d34-0410-b5e6-96231b3b80d8
| * clang-format: Improve <<-formatting.Daniel Jasper2013-07-122-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression caused by r186115. Before: Diag(aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbb) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; After: Diag(aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbb) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186164 91177308-0d34-0410-b5e6-96231b3b80d8
| * clang-format: Fix string literal breaking.Daniel Jasper2013-07-122-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, it did not cooperate with Style::AlwaysBreakBeforeMultilineStrings. Thus, it would turn aaaaaaaaaaaa(aaaaaaaaaaaaa, "aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa"); into: aaaaaaaaaaaa(aaaaaaaaaaaaa, "aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa " "aaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa"); and only a second format step would lead to the desired (with that option): aaaaaaaaaaaa(aaaaaaaaaaaaa, "aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa " "aaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa"); This could even lead to clang-format breaking the string at a different character and thus leading to a completely different end result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186154 91177308-0d34-0410-b5e6-96231b3b80d8
| * clang-format: Break before/between array subscript expressions.Daniel Jasper2013-07-123-11/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format used to treat array subscript expressions much like function call (just replacing () with []). However, this is not really appropriate especially for expressions with multiple subscripts. Although it might seem counter-intuitive, the most consistent solution seems to be to always (if necessary) break before a square bracket, never after it. Also, multiple subscripts of the same expression should be aligned if they are on subsequent lines. Before: aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaaaa][ bbbbbbbbbbbbbbbbbbbbbbbbb] = c; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa][ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] = ccccccccccc; After: aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaaaa] [bbbbbbbbbbbbbbbbbbbbbbbbb] = c; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] [bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] = ccccccccccc; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186153 91177308-0d34-0410-b5e6-96231b3b80d8
| * [analyzer] Add support for __builtin_addressof.Jordan Rose2013-07-122-1/+11
| | | | | | | | | | | | ...so we don't regress on std::addressof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186140 91177308-0d34-0410-b5e6-96231b3b80d8
| * [scan-build] Pass through all -f and -O flags, along with -Wwrite-strings.Jordan Rose2013-07-111-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | These flags control language options and user-visible macros, so it's important to preserve them when analyzing. Rather than try to keep up with all the -f flags, we'll pass them all through and then ban the ones we don't want (like -fsyntax-only). -Wwrite-strings is really an f-flag in disguise: it implies -fconst-strings. Patch by Keaton Mowry, modified by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186138 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix crash on zero-argument assignment operator.Eli Friedman2013-07-113-4/+11
| | | | | | | | | | | | | | Make sure we don't crash when checking whether an assignment operator without any arguments is a special member. <rdar://problem/14397774>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186137 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add the ability to use guarded malloc when running clang's lit tests.David Dean2013-07-111-0/+20
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186135 91177308-0d34-0410-b5e6-96231b3b80d8
| * Provide a fixit hint for changing '->' to '.' if there is no operator->Kaelyn Uhrain2013-07-112-4/+23
| | | | | | | | | | | | defined for a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186128 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make CXXBaseSpecifier::getType return unqual type.Eli Friedman2013-07-112-1/+13
| | | | | | | | | | | | | | | | | | | | | | Various pieces of code, like base initialization in Sema and RTTI IRGen, don't properly ignore qualifiers on base classes. Instead of auditing the whole codebase, just strip them off in the getter. (The type as written is still available in the TypeSourceInfo for code that cares.) Fixes PR16596. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186125 91177308-0d34-0410-b5e6-96231b3b80d8
| * clang-format: Fix bug concerning the alignment of "}".Daniel Jasper2013-07-112-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: int i; // indented 2 space more than clang-format would use. SomeReturnType // clang-format invoked on this line. SomeFunctionMakingLBraceEndInColumn80() { } // This is the indent clang-format would prefer. After: int i; // indented 2 space more than clang-format would use. SomeReturnType // clang-format invoked on this line. SomeFunctionMakingLBraceEndInColumn80() { } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186120 91177308-0d34-0410-b5e6-96231b3b80d8
| * clang-format: Break before trailing annotations.Daniel Jasper2013-07-112-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (if they are not function-like). Before: SomeFunction(aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE; After: SomeFunction(aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186117 91177308-0d34-0410-b5e6-96231b3b80d8
| * clang-format: Avoid line breaks before the first <<.Daniel Jasper2013-07-113-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This puts a slight penalty on the linebreak before the first "<<", so that clang-format generally tries to keep things on the first line. User feedback has shown that this is generally desirable. Before: llvm::outs() << "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =" << aaaaaaaaaaaaaaaaaaaaaaaaaaa; After: llvm::outs() << "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =" << aaaaaaaaaaaaaaaaaaaaaaaaaaa; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186115 91177308-0d34-0410-b5e6-96231b3b80d8
| * Restore warning to its original text whenFariborz Jahanian2013-07-112-3/+3
| | | | | | | | | | | | | | | | certain familiy of methods have the wrong type. // rdar://14408244 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186111 91177308-0d34-0410-b5e6-96231b3b80d8
| * Simplify GetBuiltinNames by hoising the NoBuiltins argument out of it.Eli Bendersky2013-07-113-9/+8
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186106 91177308-0d34-0410-b5e6-96231b3b80d8
| * ObjectiveC arc[qoi]: When due to change of certain methods'Fariborz Jahanian2013-07-115-7/+60
| | | | | | | | | | | | | | | | | | result type, a diagnostic being issued, issue a 'note' mentioning reason behind the unexpected warning. // rdar://14121570. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186105 91177308-0d34-0410-b5e6-96231b3b80d8
| * Improve detection of trailing return types.Daniel Jasper2013-07-112-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Trailing return types can only occur in declaration contexts. Before: void f() { auto a = b -> c(); } After: void f() { auto a = b->c(); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186087 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix indentation problem for comments in call chainsDaniel Jasper2013-07-112-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: SomeObject // Calling someFunction on SomeObject .someFunction(); After: SomeObject // Calling someFunction on SomeObject .someFunction(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186085 91177308-0d34-0410-b5e6-96231b3b80d8
| * Keep trailing annotations close to their argument.Daniel Jasper2013-07-112-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Before: bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY( aaaaaaaaaaaa); After: bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(aaaaaaaaaaaa); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186077 91177308-0d34-0410-b5e6-96231b3b80d8
| * PR5066: If a declarator cannot have an identifier, and cannot possibly beRichard Smith2013-07-117-1/+59
| | | | | | | | | | | | | | | | | | | | followed by an identifier, then diagnose an identifier as being a bogus part of the declarator instead of tripping over it. Improves diagnostics for cases like std::vector<const int *p> my_vec; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186061 91177308-0d34-0410-b5e6-96231b3b80d8
| * Documentation fixes - the rest of DeclCXX.h:James Dennett2013-07-111-114/+130
| | | | | | | | | | | | | | | | | | | | * More \brief additions/fixes; * Fix some misleading comments about C++11's explicit conversion operators; * Mark up some \code examples; * Add \file documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186059 91177308-0d34-0410-b5e6-96231b3b80d8
| * Documentation cleanup for DeclCXX.h:James Dennett2013-07-111-179/+197
| | | | | | | | | | | | | | | | | | | | | | * Fixing up \brief summaries (adding some, making some briefer); * Standardizing on \commands, not @commands; * Update C++0x references to C++11; * Fix typos and Doxygen warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186056 91177308-0d34-0410-b5e6-96231b3b80d8
| * clang/test/CodeGen/c11atomics.c: Fix testcase for -Asserts since r186054.NAKAMURA Takumi2013-07-111-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186055 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix build.Eli Friedman2013-07-111-2/+2
| | | | | | | | | | | | Sorry about that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186054 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add a __builtin_addressof that performs the same functionality as the built-inRichard Smith2013-07-117-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | & operator (ignoring any overloaded operator& for the type). The purpose of this builtin is for use in std::addressof, to allow it to be made constexpr; the existing implementation technique (reinterpret_cast to some reference type, take address, reinterpert_cast back) does not permit this because reinterpret_cast between reference types is not permitted in a constant expression in C++11 onwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186053 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make CheckAddressOfOperand a member of Sema so it can be reused byRichard Smith2013-07-112-35/+36
| | | | | | | | | | | | | | __builtin_addressof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186052 91177308-0d34-0410-b5e6-96231b3b80d8
| * Simplify atomic load/store IRGen.Eli Friedman2013-07-116-149/+71
| | | | | | | | | | | | Also fixes a couple minor bugs along the way; see testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186049 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix some grammar errors.Richard Smith2013-07-111-4/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186048 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix documentation:Richard Smith2013-07-111-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #if defined(__has_foo("X")) && __has_foo("X") is not a correct way to portably use __has_foo, because it is expanded to #if 0 && 0("X") ... which is ill-formed. Also add a missing ')'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186047 91177308-0d34-0410-b5e6-96231b3b80d8
| * If we friend a declaration twice, that should not make it visible to nameRichard Smith2013-07-108-28/+66
| | | | | | | | | | | | | | | | | | | | lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186040 91177308-0d34-0410-b5e6-96231b3b80d8
| * ObjC migrator: Improve on hueristics.Fariborz Jahanian2013-07-105-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | migrate to 'copy attribute if Object class implements NSCopying otherwise assume implied 'strong'. Remove lifetime qualifier on property as it has moved to property's attribute. Added TODO comment for future work by poking into setter implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186037 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use a LexicalScope here since it is one and it will encapsulateEric Christopher2013-07-101-12/+2
| | | | | | | | | | | | the two sets of debug scope and cleanup scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186030 91177308-0d34-0410-b5e6-96231b3b80d8
| * [analyzer] Remove bogus assert: in C++11, 'new' can do list-initialization.Jordan Rose2013-07-102-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we asserted that whenever 'new' did not include a constructor call, the type must be a non-record type. In C++11, however, uniform initialization syntax (braces) allow 'new' to construct records with list-initialization: "new Point{1, 2}". Removing this assertion should be perfectly safe; the code here matches what VisitDeclStmt does for regions allocated on the stack. <rdar://problem/14403437> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186028 91177308-0d34-0410-b5e6-96231b3b80d8