aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-11Fix failing dependencies-and-pp.c testReid Kleckner
The bots seem to do more line wrapping because they have longer absolute paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Use lit's internal shell runner on Windows for Clang testsReid Kleckner
The behavior can be overridden by setting LIT_USE_INTERNAL_SHELL=0 in the environment. This fixes issues with /dev/null for me and brings the test suite time down to 30s. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179283 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11FileCheck-ify more grep tests with quoted double quotesReid Kleckner
This required some tedious reordering to match clang's order. Presumably these ObjC tests were generated based on llvm-gcc's output ordering. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179282 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Fix formatting of overloaded assignment operators.Daniel Jasper
Before: SomeType &operator=(const SomeType & S); After: SomeType &operator=(const SomeType &S); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179270 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[analyzer] Factor common code from {SymSym,SymInt,IntSym}Expr to BinarySymExprRyan Govostes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179269 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11ARCMigrate/Transforms.h: Remove \arg in comment. [-Wdocumentation]NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179261 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Drop ObjCIndirectCopyRestoreExprs during template instantiation.John McCall
It's a kind of implicit conversion, which we generally drop, but more importantly it's got very specific placement requirements. rdar://13617051 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179254 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[libclang] Expose record layout info via new libclang functions:Argyrios Kyrtzidis
clang_Type_getAlignOf clang_Type_getSizeOf clang_Type_getOffsetOf clang_Cursor_isBitField Patch by Loïc Jaquemet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Force a load when creating a reference to a temporary copied from a bitfield.Jordan Rose
For this source: const int &ref = someStruct.bitfield; We used to generate this AST: DeclStmt [...] `-VarDecl [...] ref 'const int &' `-MaterializeTemporaryExpr [...] 'const int' lvalue `-ImplicitCastExpr [...] 'const int' lvalue <NoOp> `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...] `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X' Notice the lvalue inside the MaterializeTemporaryExpr, which is very confusing (and caused an assertion to fire in the analyzer - PR15694). We now generate this: DeclStmt [...] `-VarDecl [...] ref 'const int &' `-MaterializeTemporaryExpr [...] 'const int' lvalue `-ImplicitCastExpr [...] 'int' <LValueToRValue> `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...] `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X' Which makes a lot more sense. This allows us to remove code in both CodeGen and AST that hacked around this special case. The commit also makes Clang accept this (legal) C++11 code: int &&ref = std::move(someStruct).bitfield PR15694 / <rdar://problem/13600396> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[analyzer] Refactoring: better doxygen comment; renaming isTrackedFamily to ↵Anton Yartsev
isTrackedByCurrentChecker git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179242 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10comment parsing. Add couple more needed doxygen tags.Fariborz Jahanian
// rdar://12379053 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179238 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10get rid of stdio.h include in testcaseAdrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10add mips target requirement to testcaseAdrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179236 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[analyzer] Address Jordan’s review of r179219Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[analyzer] Address Jordan’s code review of r 179221Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179234 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[analyzer] +Testcase: several used-after-free args passed to a function.Anton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179232 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[analyzer] Switched to checkPreCall interface for detecting usage after free.Anton Yartsev
Now the check is also applied to arguments for Objective-C method calls and to 'this' pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179230 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Mips specific inline asm memory operand modifier test caseJack Carter
These changes are based on commit responses for r179135. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179229 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[analyzer] Fix a crash in SyntaxCString checker when given a custom strncat.Anna Zaks
Fixes PR13476 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179228 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[analyzer] When reporting a leak in RetainCount checker due to an early exit ↵Anna Zaks
from init, step into init. The heuristic here (proposed by Jordan) is that, usually, if a leak is due to an early exit from init, the allocation site will be a call to alloc. Note that in other cases init resets self to [super init], which becomes the allocation site of the object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179221 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[analyzer] Cleanup leak warnings: do not print the names of variables from ↵Anna Zaks
other functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179219 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10For split dwarf we should also run the objcopy action if we'reEric Christopher
just assembling a file and have passed the option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179218 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Remove unused arguments.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179217 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[driver] Add a -Ofast option, which enables -O3, -ffast-math, andChad Rosier
-fstrict-aliasing. rdar://13622687 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179216 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10FileCheck-ify some clang grep tests that use double quotesReid Kleckner
The escaping interaction between Python and grep doesn't work on my system. This change fixes the tests for me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179214 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10-fparse-all-comments: remove redundant check, as suggested by Fariborz JahanianDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179204 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[ms-inline asm] Move a few test cases from the 32-bit version to the 64-bitChad Rosier
version as lea is only available in 64-bit mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179190 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[ms-inline asm] Add a few test cases that were regressed by r179115. ThatChad Rosier
commit was reverted in r179120, but I do plan on reapplying with a fix shortly. Part of rdar://13611297 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179182 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Add testcases for -fparse-all-commentsDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179181 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Add an option to parse all comments as documentation commentsDmitri Gribenko
Patch by Amin Shali. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179180 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Fixes recovering from errors when parsing braced init lists.Manuel Klimek
Before we would build huge unwrapped lines which take a long time to optimze. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179168 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Fix labels with trailing comments and cleanup.Daniel Jasper
Before: class A { public : // test }; After: class A { public: // test }; Also remove duplicate methods calculating properties of AnnotatedTokens and make them members of AnnotatedTokens so that they are in a common place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179167 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Handle "typeof" in Objective-C format string checking. This previously crashed.Ted Kremenek
Yes, this came from actual code. Fixes <rdar://problem/13557053>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179155 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Add support for computing the exception specification for an inheritingRichard Smith
constructor. This isn't quite perfect (as usual, we don't handle default arguments correctly yet, and we don't deal with copy/move constructors for arguments correctly either, but this will be fixed when we implement core issue 1351. This completes our support for inheriting constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179154 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Don't crash when mangling types defined in ObjC class extensions.John McCall
The original test case here was mangling a type name for TBAA, but we can provoke this in C++11 easily enough. rdar://13434937 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179153 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10C++11 inheriting constructors: support for inheriting constructor templates.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179151 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10<rdar://problem/13605348> Don't consider invalid user-defined literal ↵Douglas Gregor
operators during overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179150 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[frontend] -frewrite-includes: turn implicit module imports into @imports.Argyrios Kyrtzidis
rdar://13610250 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179145 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[frontend] When preprocessing, turn implicit module imports into @imports.Argyrios Kyrtzidis
part of rdar://13610250 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179144 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[frontend] -frewrite-includes: if there was no inclusion, don't add lineinfo ↵Argyrios Kyrtzidis
that indicates return from another file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179143 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Repeat some #line directive tests for the GNU line marker directive.Michael Ilseman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179142 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Improve the diagnostics of the number-reading preprocessor directives.Michael Ilseman
The GNU line marker directive was sharing code with the #line directive, but some of the warnings/errors were reporting as #line directive diagnostics in both cases. Previously: #line 11foo1 ==> "#line directive requires a simple digit sequence" # 11foo1 ==> "#line directive requires a simple digit sequence" Now, we get: #line 11foo1 ==> "#line directive requires a simple digit sequence" # 11foo1 ==> "GNU line marker directive requires a simple digit sequence" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179139 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Suppress -Wunused-variable for variables declared in headers, which may inMatt Beaumont-Gay
fact be defined and used in another TU. Reshuffle some test cases because we suppress -Wunused-variable after we've emitted an error. This fixes PR15558. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179138 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09Remove outdated run lines from tests.Richard Trieu
These run lines originally tested that the fix-its were properly applied. Originally, the fixits were attached to warnings and were applied by -fixit. Now, the fixits are attached to notes, so nothing happens. These run lines still manage to pass since Clang will produce an empty output which gets piped back to Clang. Then Clang produces no error on an empty input. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179131 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09Updating cpp11-migrate transform list in ClangTools docsEdwin Vane
Author: Philip Dunstan <phil@phildunstan.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179128 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09Adding new AST Matchers isVirtual and isOverrideEdwin Vane
isVirtual - matches CXXMethodDecl nodes for virtual methods isOverride - matches CXXMethodDecl nodes for methods that override virtual methods from a base class. Author: Philip Dunstan <phil@philipdunstan.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179126 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09[c-index-test] Enable 'display diagnostics' when using the -test-load ↵Argyrios Kyrtzidis
functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179123 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09[libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179121 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09Objective-C: This patch fixes a none-issuance of warningFariborz Jahanian
when result type of protocol property and getter method differ by fixing a more serious problem. When a forward protocol declaration comes between its definition and its use in class protocol list, the forward protocol ast was being used in building the protocol list. // rdar://12522752 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09Fix comments before labels.Daniel Jasper
Before: switch (...) { // a // b // c case first: break; } After: switch (...) { // a // b // c case first: break; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179107 91177308-0d34-0410-b5e6-96231b3b80d8