summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Reverting r226548 as one of the tests fails in some configurations.Alexander Kornienko2015-01-206-38/+3
| | | | | | | | | | | | | | | | | | | | | | Here's the fail log from our internal setup: === .../tools/clang/clang -cc1 -internal-isystem .../tools/clang/staging/include -nostdsysteminc .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl -triple spir-unknown-unknown -emit-llvm -o - FileCheck .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl:11:12: error: expected string not found in input // CHECK: %call = tail call spir_func i32 @get_dummy_id(i32 0) ^ <stdin>:6:52: note: scanning from here define spir_kernel void @foo(i32 addrspace(1)* %A) #0 { ^ <stdin>:7:2: note: possible intended match here %1 = tail call spir_func i32 @get_dummy_id(i32 0) #2 ^ === Here's a failure on a public CI server: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/1183/ llvm-svn: 226558
* Test commit, no changes.Pavel Labath2015-01-201-1/+1
| | | | llvm-svn: 226552
* [OPENMP] Fixed DSA processing for predetermined shared variables.Alexey Bataev2015-01-201-6/+6
| | | | | | | This patch allows to use predetermined shared variables in private clauses in parallel or tasks regions. llvm-svn: 226549
* Introduce SPIR calling conventions.Sameer Sahasrabuddhe2015-01-206-3/+38
| | | | | | | | | | | | | | This implements Section 3.7 from the SPIR 1.2 spec: SPIR kernels should use "spir_kernel" calling convention. Non-kernel functions use "spir_func" calling convention. All other calling conventions are disallowed. The patch works only for OpenCL source. Any other uses will need to ensure that kernels are assigned the spir_kernel calling convention correctly. llvm-svn: 226548
* CodeGen: Update LoopAttributes for LLVM API changeDuncan P. N. Exon Smith2015-01-191-3/+2
| | | | | | `MDNode::getTemporary()` returns a `unique_ptr<>` as of r226504. llvm-svn: 226505
* [AVX512] Add sub-vector FP extractsAdam Nemet2015-01-191-0/+18
| | | | | | | | | Analogous to AVX2, these need to be implemented as macros to properly propagate the immediate index operand. Part of <rdar://problem/17688758> llvm-svn: 226496
* Migrate all uses of DIVariable's FlagIndirectVariable to use a DIExpressionAdrian Prantl2015-01-191-11/+12
| | | | | | with a DW_OP_deref instead. llvm-svn: 226474
* Add comdat to thunks.Rafael Espindola2015-01-191-1/+4
| | | | llvm-svn: 226465
* clang-format: Fix crasher on weird comments.Daniel Jasper2015-01-191-4/+2
| | | | | | | | Crashing input: /\ / comment llvm-svn: 226454
* clang-format: Fix crasher on incomplete condition compilation.Daniel Jasper2015-01-191-1/+1
| | | | | | | | | | | Previously crashing input: void f( #if A ); #else #endif llvm-svn: 226451
* clang-format: Fix crash on invalid code.Daniel Jasper2015-01-191-1/+2
| | | | | | Input "a<," made clang-format crash. llvm-svn: 226450
* clang-format: Fix clang-format crash on invalid code.Daniel Jasper2015-01-191-1/+1
| | | | llvm-svn: 226449
* clang-format: Fix assertion when trying to build a nullptr StringRef.Daniel Jasper2015-01-191-0/+1
| | | | llvm-svn: 226448
* clang-format: Fix endless loop on incomplete try-catch-block.Daniel Jasper2015-01-191-1/+1
| | | | llvm-svn: 226447
* clang-format: Remove assert that isn't helpful.Daniel Jasper2015-01-191-1/+0
| | | | | | | This assert would trigger on: #d , = } llvm-svn: 226446
* Add back a check removed in r226436David Majnemer2015-01-191-2/+12
| | | | | | | It shouldn't have been removed, the code which replaced it didn't cover this case. llvm-svn: 226442
* SemaDeclCXX.cpp: Suppress a warning. [-Wunused-variable]NAKAMURA Takumi2015-01-191-0/+1
| | | | llvm-svn: 226441
* Sema: Variable definitions cannot be __attribute__((alias))David Majnemer2015-01-192-24/+28
| | | | | | | | | | | | | | | | | | | | Things that are OK: extern int var1 __attribute((alias("v1"))); static int var2 __attribute((alias("v2"))); Things that are not OK: int var3 __attribute((alias("v3"))); extern int var4 __attribute((alias("v4"))) = 4; We choose to accpet: struct S { static int var5 __attribute((alias("v5"))); }; This code causes assertion failues in GCC 4.8 and ICC 13.0.1, we have no reason to reject it. This partially fixes PR22217. llvm-svn: 226436
* [OPENMP] Disable copyprivate an nowait clauses in 'single' directive.Alexey Bataev2015-01-191-0/+17
| | | | | | | The copyprivate clause must not be used with the nowait clause in single directive. llvm-svn: 226429
* PR6037Nathan Sidwell2015-01-191-3/+58
| | | | | | Warn on inaccessible direct base llvm-svn: 226423
* [x86] Teach Sema to check size of comparison immediate on avx512 cmpps/cmppd ↵Craig Topper2015-01-191-1/+3
| | | | | | buitins. llvm-svn: 226422
* [x86] Mark that the AVX-512 cmpps/cmppd builtins need an ICE for the ↵Craig Topper2015-01-191-16/+13
| | | | | | comparison immediate. This requires converting to a macro in the header file. llvm-svn: 226421
* Handle unscoped enumeration in nested name specifier.Serge Pavlov2015-01-181-8/+27
| | | | | | | | | | If an unscoped enum is used as a nested name specifier and the language dialect is not C++ 11, issue an extension warning. This fixes PR16951. Differential Revision: http://reviews.llvm.org/D6389 llvm-svn: 226413
* Add comment after API changes in r225090David Blaikie2015-01-181-2/+4
| | | | | | Code review suggestion by Eric Christopher. llvm-svn: 226395
* DebugInfo: Attribute complex expressions to the source location of the ↵David Blaikie2015-01-181-0/+1
| | | | | | | | | expression Just as r225956 did for scalar expressions (CGExprScalar::Visit), do the same for complex expressions. llvm-svn: 226390
* Address review feedback from r215780: Use a flag insteda of the heap. No ↵Nico Weber2015-01-181-24/+12
| | | | | | behavior change. llvm-svn: 226389
* DebugInfo: Attribute aggregate expressions to the source location of the ↵David Blaikie2015-01-181-0/+5
| | | | | | | | | expression Just as r225956 did for scalar expressions (CGExprScalar::Visit), do the same for aggregate expressions. llvm-svn: 226388
* Recommit r225083 (reverted in r225361) now that calls to aggregate ↵David Blaikie2015-01-182-11/+0
| | | | | | | | | | | | | | | | | | | initializers from in class non-static data members are explicitly attributed to the desired line. The code setting the debug location being removed here was accidentally leaking a location into the call to the non-static data member's ctor call. Without it the call had no location and could cause assertion failures if it was inlined. Now that it has a location (and a correct one at that) this code should hopefully be no longer needed. It's possible of course that other parts of the debug info are also relying on the debug locations being set here to leak to where they're needed - so we might see the same assertions again & will have to investigate what the dependence was/is. But the chances are good that any of those are debug info line table quality bugs we've just not found yet anyway - so it'll be good to flush them out. llvm-svn: 226383
* DebugInfo: Correct the debug location of non-static data member initializersDavid Blaikie2015-01-182-5/+4
| | | | | | | | | | This was causing some trouble for otherwise dead code removed in r225085 (reverted in r225361). The location being set for function arguments was leaking out to the call which wasn't setting its own location (so a quality bug turned into a crasher with r225085). Fix this so r225085 can be recommitted. llvm-svn: 226382
* [msan] Fix a uninitialized-use bug in the template argument diffingChandler Carruth2015-01-171-1/+2
| | | | | | | | | | | | | | | | | logic. In one place we would try to check for the difference between integers even if we were missing one of the integers. This would eventually end up reading uninitialized data out of the APSInt objects. The fix is to short circuit the sameness test when we don't have integers on both sides. This fixes a test failure I was seeing with MSan. Not sure whether other bots were seeing it or not, but yay MSan. In particular the feature to very carefully track origins back through stores throughout the program was invaluable. llvm-svn: 226375
* If a function decl cannot be merged, mark it as invalid.Nico Weber2015-01-171-0/+1
| | | | | | | | | | | | | | | | | | | Clang currently crashes on class C { C() = default; C() = delete; }; My cunning plan for fixing this was to change the `if (!FnD)` in Parser::ParseCXXInlineMethodDef() to `if (!FnD || FnD->isInvalidDecl)` – but alas, the second constructor decl wasn't marked as invalid. This lets Sema::MergeFunctionDecl() return true on function redeclarations, which leads to them being marked invalid. This also improves error messages when functions are redeclared. llvm-svn: 226365
* Wrap to 80 columns. No behavior change.Nico Weber2015-01-171-1/+2
| | | | llvm-svn: 226364
* Address review feedback from r226306. No intended behavior change.Nico Weber2015-01-171-2/+2
| | | | llvm-svn: 226363
* Make sure all weak destructors go in a comdat in the ms abi.Rafael Espindola2015-01-171-1/+2
| | | | | | | Destructors have a special treatment in getFunctionLinkage. Instead of duplicating the logic, check the resulting linkage. llvm-svn: 226361
* Clean up a string comparison with StringRef. Suggestion by David Majnemer.Richard Trieu2015-01-171-1/+2
| | | | llvm-svn: 226359
* Remove std::move that was preventing return value optimization.Richard Trieu2015-01-171-1/+1
| | | | llvm-svn: 226357
* Adding option -fno-inline-asm to disallow inline asmSteven Wu2015-01-163-0/+11
| | | | | | | | | | | | | | | | Summary: This patch add a new option to dis-allow all inline asm. Any GCC style inline asm will be reported as an error. Reviewers: rnk, echristo Reviewed By: rnk, echristo Subscribers: bob.wilson, rnk, echristo, rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D6870 llvm-svn: 226340
* Suggest objc_method_family(none) for a property named -newFoo or similar.Jordan Rose2015-01-161-0/+34
| | | | | | | | | | | | | | | As mentioned in the previous commit, if a property (declared with @property) has a name that matches a special Objective-C method family, the getter picks up that family despite being declared by the property. The most correct way to solve this problem is to add the 'objc_method_family' attribute to the getter with an argument of 'none', which unfortunately requires an explicit declaration of the getter. This commit adds a note to the existing error (ARC) or warning (MRR) for such a poorly-named property that suggests the solution; if there's already a declaration of the getter, it even includes a fix-it. llvm-svn: 226339
* ObjC getters with names like "newItem" should still be linked to the @property.Jordan Rose2015-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Two years ago I added a compile-time "optimization" to ObjCMethodDecl::findPropertyDecl: exit early if the current method is part of a special Objective-C method family (like 'new' or 'init'). However, if a property (declared with @property) has a name that matches a method family, the getter picks up that family despite being declared by the property. The early exit then made ObjCMethodDecl::findPropertyDecl decide that there was no associated property, despite the method itself being marked as an accessor. This corrects that by removing the early exit. This does /not/ change the fact that such a getter is considered to return a value with a +1 retain count. The best way to eliminate this is by adding the objc_method_family(none) attribute to the getter, but unlike the existing ns_returns_not_retained that can't be applied directly to the property -- you have to redeclare the getter instead. (It'd be nice if @property just implied objc_method_family(none) for its getter, but that would be a backwards-incompatible change.) rdar://problem/19038838 llvm-svn: 226338
* Fix a case where delayed typo correction should have resolved anKaelyn Takata2015-01-162-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ambiguity but wasn't. In the new test case, "click" wasn't being corrected properly because Sema::ClassifyName would call CorrectTypo for "click" then later Sema::DiagnoseEmptyLookup would call CorrectTypoDelayed for the same use of "click" (the former by the parser needing to determine what the identifier is so it knows how to parse the statement, i.e. is it the beginning of a declaration or an expression). CorrectTypo would record that typo correction for "click" failed and CorrectTypoDelayed would see that and not even try to correct the typo, even though in this case CorrectTypo failed due to an ambiguity (both "Click" and "clock" having an edit distance of one from "click") that could be resolved with more information. The fix is two-fold: 1) Have CorrectTypo not record failed corrections if the reason for the failure was two or more corrections with the same edit distance, and 2) Make the CorrectionCandidateCallback used by Parser::ParseCastExpression reject FunctionDecl candidates when the next token after the identifier is a ".", "=", or "->" since functions cannot be assigned to and do not have members that can be referenced. The reason for two correction spots is that from r222549 until r224375 landed, the first correction attempt would fail completely but the second would suggest "clock" while having the note point to the declaration of "Click". llvm-svn: 226334
* Fix some copypasta typos in asserts.Sean Silva2015-01-161-2/+2
| | | | | | | | Fixes PR22236 Patch by Nicolas Brunie! <nicolas.brunie@kalray.eu> llvm-svn: 226328
* Also put vtables in a comdat when rtti is disabled.Rafael Espindola2015-01-161-0/+4
| | | | llvm-svn: 226325
* Wrap to 80 columns. No behavior change.Nico Weber2015-01-161-1/+2
| | | | llvm-svn: 226320
* Add comdat to string literal variables on COFF.Rafael Espindola2015-01-161-2/+8
| | | | llvm-svn: 226317
* Spell 0 in an enum-appropriate way. No behavior change.Nico Weber2015-01-161-1/+1
| | | | llvm-svn: 226307
* Don't crash if a declarator in a friend decl doesn't have a name.Nico Weber2015-01-161-12/+16
| | | | | | | | | | | There was already an explicit check for that for the first decl. Move that to a different place so that it's called for the following decls too. Also don't randomly set the BitfieldSize ExprResult to true (this sets a pointer to true internally). Found by SLi's bot. llvm-svn: 226306
* Add comdats to the RTTI variables in the microsoft abi.Rafael Espindola2015-01-161-7/+16
| | | | llvm-svn: 226303
* [AVX512] Add intrinsics for masked aligned FP loads and storesAdam Nemet2015-01-161-2/+51
| | | | | | Part of <rdar://problem/17688758> llvm-svn: 226298
* AArch64: implement AAPCS layout rules for bit-fields.Tim Northover2015-01-161-0/+7
| | | | llvm-svn: 226294
* Add comdats to dynamic init functions in the microsoft abi.Rafael Espindola2015-01-161-1/+3
| | | | llvm-svn: 226286
OpenPOWER on IntegriCloud