summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable ActOnIdExpression to use delayed typo correction for non-C++ codeKaelyn Takata2014-11-219-22/+68
| | | | | | when calling DiagnoseEmptyLookup. llvm-svn: 222551
* Properly correct initializer expressions based on whether they would be valid.Kaelyn Takata2014-11-212-0/+51
| | | | llvm-svn: 222550
* Use the full-Expr filter to disambiguate equidistant correctionKaelyn Takata2014-11-212-26/+52
| | | | | | candidates. llvm-svn: 222549
* clang-format: Understand more lambda return types.Daniel Jasper2014-11-213-1/+10
| | | | | | | | | | Before: auto a = [&b, c ](D * d) -> D * {} After: auto a = [&b, c](D* d) -> D* {} llvm-svn: 222534
* clang-format: Use nested block special case for all languages.Daniel Jasper2014-11-215-52/+80
| | | | | | | | | | | | | | | | | | | Previously this was only used for JavaScript. Before: functionCall({ int i; int j; }, aaaa, bbbb, cccc); After: functionCall({ int i; int j; }, aaaa, bbbb, cccc); llvm-svn: 222531
* Fix test after r222526.Dmitry Vyukov2014-11-211-2/+1
| | | | llvm-svn: 222530
* clang-format: Handle comments in short case labels.Daniel Jasper2014-11-212-1/+6
| | | | | | | | | | | | | | | With AllowShortCaseLabelsOnASingleLine set to true: This gets now left unchanged: case 1: // comment return; Whereas before it was changed into: case 1: // comment return; This fixes llvm.org/PR21630. llvm-svn: 222529
* clang-format: [Java] Support more Java keywords.Daniel Jasper2014-11-213-2/+9
| | | | | | | | | | | | | | | | | | Before: public final<X> Foo foo() { } public abstract<X> Foo foo(); After: public final <X> Foo foo() { } public abstract <X> Foo foo(); Patch by Harry Terkelsen. Thank you. llvm-svn: 222527
* clang: do not add -pie for tsanDmitry Vyukov2014-11-213-6/+6
| | | | | | | | | Revision 220571 removes the requirement to use -pie for tsan binaries. So remove -pie from driver. Also s/hasZeroBaseShadow/requiresPIE/ because that is what it is used for. Msan does not have zero-based shadow, but requires pie. And in general the relation between zero-based shadow and pie is unclear. http://reviews.llvm.org/D6318 llvm-svn: 222526
* clang-format: [Java] Basic lambda support.Daniel Jasper2014-11-213-0/+25
| | | | llvm-svn: 222524
* [OPENMP] Disable CapturedStmt generation for standalone directives.Alexey Bataev2014-11-211-32/+4
| | | | | | No functional changes, just code improvement. llvm-svn: 222523
* MS ABI: Mangle char16_t and char32_t typesDavid Majnemer2014-11-212-2/+8
| | | | | | | These mangling make clang more compatible with MSVC 2015. Correctly mangling char16_t and char32_t will take a little more work. llvm-svn: 222515
* Fix missing diagnostic for unsupported TLS for some thread_local variables.Bob Wilson2014-11-212-16/+19
| | | | | | | | | Clang r181627 moved a check for block-scope variables into this code for handling thread storage class specifiers, but in the process, it broke the logic for checking if the target supports TLS. Fix this with some simple restructuring of the code. rdar://problem/18796883 llvm-svn: 222512
* [modules] When explicitly importing a module, it's fine for the imported moduleRichard Smith2014-11-212-0/+27
| | | | | | | | to be newer than we were expecting. That happens if .pcm's get moved between file systems during a distributed build. (It's still not OK for them to actually be different, though, so we still check the size and signature matches.) llvm-svn: 222507
* PR21323: Fix iterator invalidation issue when looking for redeclarations of aRichard Smith2014-11-211-3/+8
| | | | | | | | | special member function. No test yet: the only testcases we have for this issue are extremely complex. Testcase will be added once I get a reasonable reduction. llvm-svn: 222506
* Extend -Wuninitialized to warn when accessing uninitialized base classes in aRichard Trieu2014-11-213-12/+83
| | | | | | constructor. llvm-svn: 222503
* relax this testcase to not depend on a specific alignment.Adrian Prantl2014-11-211-1/+1
| | | | llvm-svn: 222490
* Debug info for blocks: Fix a bug caught by the Verifier.Adrian Prantl2014-11-214-5/+37
| | | | | | | | | | | | When emitting nested block definitions, the insert-at-point variant of DIBuilder::insertDeclare() could be called with the insertion point set to the end-of-BasicBlock sentinel, causing the parent pointer of the CallInst to be set to the intentionally bogus value of the sentinel. Fixed by conditionally invoking the correct version of insertDeclare(). rdar://problem/19034882 llvm-svn: 222487
* DebugInfo: Fix another case of r222377 when we do have a definition of the ↵David Blaikie2014-11-212-11/+24
| | | | | | variable, but we might not be emitting it (such as templates) llvm-svn: 222485
* Remove code that tries to avoid transforming non-dependent call operator typesRichard Smith2014-11-202-78/+29
| | | | | | | | | | for lambda expressions. That can't ever work; we need to transform the parameters in order to create new ones in the new call operator context. Fixes a rejects-valid when transforming a context containing a lambda-expression that uses its function parameters in C++14 mode. llvm-svn: 222482
* Move test from r222476 to a better place; this was reduced to the point that itRichard Smith2014-11-202-7/+7
| | | | | | no longer contained a generic lambda. llvm-svn: 222477
* Fix crash-on-valid if a lambda-expression appears lexically directly within aRichard Smith2014-11-202-1/+11
| | | | | | local class inside a template. llvm-svn: 222476
* Intercept __crt_va_* used by MSVC "14"Reid Kleckner2014-11-201-0/+16
| | | | | | | Moving further into the implementor's namespace is good, but now we have one more name to intercept. llvm-svn: 222473
* PR21565: Further refine the conditions for enabling eager parsing ofRichard Smith2014-11-203-19/+61
| | | | | | | | std::X::swap exception specifications (allowing parsing of non-conforming code in libstdc++). The old conditions also matched the functions in MSVC's STL, which were relying on deferred parsing here. llvm-svn: 222471
* Ensure all TypoExprs are diagnosed by the tree transform.Kaelyn Takata2014-11-203-1/+23
| | | | | | | | | | | | If there is more than one TypoExpr within the expr being transformed and any but the last TypoExpr seen don't have any viable candidates, the tree transform will be aborted early and the remaining TypoExprs are never seen and hence never diagnosed. This adds a simple RecursiveASTVisitor to find all of the TypoExprs to be diagnosed in the case where typo correction of the entire expr fails (and the result of the tree transform is an ExprError). llvm-svn: 222465
* Wire up delayed typo correction to DiagnoseEmptyLookup and set upKaelyn Takata2014-11-2015-49/+197
| | | | | | | | | Sema::ActOnIdExpression to use the new functionality. Among other things, this allows recovery in several cases where it wasn't possible before (e.g. correcting a mistyped static_cast<>). llvm-svn: 222464
* Add a flag to BuildDeclarationNameExpr to not reject invalid decls.Kaelyn Takata2014-11-203-10/+14
| | | | llvm-svn: 222463
* Factor out the default recovery handling.Kaelyn Takata2014-11-201-14/+77
| | | | | | | | | | | The default handling is extended to properly create member expressions and Objective-C ivar references. Also detect and reject cases where multiple corrections have identical correction distances and are valid, instead of suggesting the first one that is found. llvm-svn: 222462
* Add a few small helper methods to the TypoCorrectionConsumer.Kaelyn Takata2014-11-201-0/+15
| | | | llvm-svn: 222461
* Correctly set the SourceRange a TypoCorrection will replace.Kaelyn Takata2014-11-202-7/+8
| | | | | | Also clean up TypoCorrection::setCorrectionRange while we're at it. llvm-svn: 222460
* The Syntax enumeration requires at least three bits to store all of its ↵Aaron Ballman2014-11-201-2/+2
| | | | | | | | | | values. Increase the number of bits for SyntaxUsed. Decrease the number of expression arguments allowed by a single bit so that the bit fields continue to add up to 32-bits evenly. There is no test for this fix because I could find no reasonable way to trigger a visible failure from it. Thanks to Doug Gregor for spotting this! llvm-svn: 222456
* Bring PostOrderCFGView's insert API up to date with other API changes.Michael Ilseman2014-11-201-4/+4
| | | | | | | | r222334 updates LLVM data structure's insert API to return a pair. This change updates PostOrderCFGView accordingly, so that it can be used interchangably with other sets. llvm-svn: 222445
* Extended list of valid frontend options with '-cl-std=CL2.0'.Anastasia Stulova2014-11-203-2/+17
| | | | | | | This option sets language mode for the compilation of a source file to be OpenCL v2.0. Example: clang -cc1 -cl-std=CL2.0 myfile.cl llvm-svn: 222444
* Testing commit access.Anastasia Stulova2014-11-201-1/+1
| | | | llvm-svn: 222438
* Remove now dead code.Frederic Riss2014-11-201-7/+0
| | | | | | | | After LLVM r222434, the Variables field of DISubprograms for forward declarations will always be null. No need to keep code around to delete them. llvm-svn: 222437
* Prepare for the DIBuilder populating DISubprogram's Variables with null.Frederic Riss2014-11-201-1/+2
| | | | | | | | | | | This is a followup to r222373. A better solution to the problem solved there is to not create the leaked nodes at all (we know that they will never be used for forward declared functions anyway). To avoid bot breakage in the interval between the cfe and llvm commits, add a check that the nMDNode is not null before deleting it. This code can completely go away after the LLVM part is in. llvm-svn: 222433
* Replace variadic operator function pointer with an enum value.Samuel Benzaquen2014-11-206-75/+100
| | | | | | | | | | | | | | | Summary: Replace variadic operator function pointer with an enum value. Hiding the implementation of the variadic matcher will allow to specialize them for the operation performed. In particular, it will allow for a more efficient allOf() matcher. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6293 llvm-svn: 222432
* Convert CR+LF -> LF in a test fileTimur Iskhodzhanov2014-11-201-53/+53
| | | | llvm-svn: 222429
* clang-format: [Java] Don't align after "return".Daniel Jasper2014-11-202-1/+17
| | | | | | | | | | | | | | | | | | Doesn't seem to be common practice in Java. Before: return aaaaaaaaaaaaaaaaaaa && bbbbbbbbbbbbbbbbbbb && ccccccccccccccccccc; After: return aaaaaaaaaaaaaaaaaaa && bbbbbbbbbbbbbbbbbbb && ccccccccccccccccccc; Patch by Harry Terkelsen. llvm-svn: 222424
* clang-format: [Java] Don't force break before generic type method.Daniel Jasper2014-11-202-0/+8
| | | | | | | | | | | | | | | Before: Foo.bar() .<X> baz(); After: Foo.bar() .<X>baz(); Patch by Harry Terkelsen. llvm-svn: 222423
* [OPENMP] Codegen for "omp flush" directive.Alexey Bataev2014-11-204-5/+73
| | | | | | | | For each "omp flush" directive a call to "void kmpc_flush(ident_t *, ...)" function is generated. Directive "omp flush" may have an associated list of variables to flush, but currently runtime function ignores them. So the patch generates just "call kmpc_flush(ident_t *<loc>, i32 0)". Differential Revision: http://reviews.llvm.org/D6292 llvm-svn: 222409
* Fix buildbots.Richard Smith2014-11-201-7/+7
| | | | llvm-svn: 222408
* [CMake] Use .svn/wc.db as our VC dependency if it's available.Jordan Rose2014-11-201-6/+10
| | | | | | | | | | | In order to keep SVNVersion.inc from being regenerated on every build, we need to specify as a dependency a file that only changes when the VC state updates. I previously just had .svn/entries, but that's only used by Subversion 1.6. 1.7 uses .svn/wc.db instead; prefer that if it's present. (Thanks, Nico!) llvm-svn: 222407
* Preserve numeric literal suffixes during type canonicalization.Richard Smith2014-11-203-0/+27
| | | | | | Patch by Pierre Gousseau! Test cases altered significantly by me. llvm-svn: 222404
* Avoid earlier test interfering with later one.Richard Smith2014-11-201-2/+2
| | | | llvm-svn: 222403
* When mangling member-expressions, skip implicit accesses of anonymous unionRichard Smith2014-11-202-0/+88
| | | | | | objects. This is consistent with GCC's behavior. Patch by Tomasz Miąsko! llvm-svn: 222402
* Remove support for undocumented SpecialCaseList entries.Alexey Samsonov2014-11-201-2/+2
| | | | | | | | | | | | | "global-init", "global-init-src" and "global-init-type" were originally used to blacklist entities in ASan init-order checker. However, they were never documented, and later were replaced by "=init" category. Old blacklist entries should be converted as follows: * global-init:foo -> global:foo=init * global-init-src:bar -> src:bar=init * global-init-type:baz -> type:baz=init llvm-svn: 222401
* PR21531: fix crash on invalid with unexpanded pack in case value.Richard Smith2014-11-202-8/+14
| | | | llvm-svn: 222400
* Revert "[Reassociate] Update test cases due to r222142."Chad Rosier2014-11-194-11/+11
| | | | | | | | | This reverts commit r222144. Commit r222142 is being reverted due to a spec2006/gcc execution-time regression. Update mips-varargs test as well. llvm-svn: 222397
* clang-format: [Java] Accept generic types in enum declarationDaniel Jasper2014-11-192-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Before: enum Foo implements Bar<X, Y> { ABC { ... } , CDE { ... }; } After: enum Foo implements Bar<X, Y> { ABC { ... }, CDE { ... }; } Patch by Harry Terkelsen. llvm-svn: 222394
OpenPOWER on IntegriCloud