summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Use the MSVC SEH personalities on MingwReid Kleckner2015-09-171-2/+4
| | | | | | | | Mingw generally wraps an old copy of msvcrt.dll which has these personalities, so things should work out, or so I hear. I haven't tested it. llvm-svn: 247902
* createOutputFile should set Error to something if it returns null.Douglas Katzman2015-09-171-1/+3
| | | | | | | This is not portably unit-testable because the only visible effect is a change from one random message string to another. llvm-svn: 247900
* re-apply r.247881Asaf Badouh2015-09-171-0/+536
| | | | | | fixed the tests. llvm-svn: 247892
* Rename AST node matchers to match the AST node names directly. Part of this ↵Aaron Ballman2015-09-171-27/+31
| | | | | | rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects. llvm-svn: 247885
* revert r.247881 due to tests failuresAsaf Badouh2015-09-171-536/+0
| | | | llvm-svn: 247883
* [X86][AVX512DQ] add new intrinsicsAsaf Badouh2015-09-171-0/+536
| | | | | | | | | | | | convert i64 to FP and vice versa reduceps & reducepd rangeps & rangepd all in their 512bit versions Differential Revision: http://reviews.llvm.org/D11716 llvm-svn: 247881
* [Static Analyzer] Generics Checker: When an ObjC method returns a ↵Gabor Horvath2015-09-161-76/+136
| | | | | | | | specialized object, track it properly. Differential Revision: http://reviews.llvm.org/D12889 llvm-svn: 247861
* [analyzer] Add generateErrorNode() APIs to CheckerContext.Devin Coughlin2015-09-1643-102/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The analyzer trims unnecessary nodes from the exploded graph before reporting path diagnostics. However, in some cases it can trim all nodes (including the error node), leading to an assertion failure (see https://llvm.org/bugs/show_bug.cgi?id=24184). This commit addresses the issue by adding two new APIs to CheckerContext to explicitly create error nodes. Unless the client provides a custom tag, these APIs tag the node with the checker's tag -- preventing it from being trimmed. The generateErrorNode() method creates a sink error node, while generateNonFatalErrorNode() creates an error node for a path that should continue being explored. The intent is that one of these two methods should be used whenever a checker creates an error node. This commit updates the checkers to use these APIs. These APIs (unlike addTransition() and generateSink()) do not take an explicit Pred node. This is because there are not any error nodes in the checkers that were created with an explicit different than the default (the CheckerContext's Pred node). It also changes generateSink() to require state and pred nodes (previously these were optional) to reduce confusion. Additionally, there were several cases where checkers did check whether a generated node could be null; we now explicitly check for null in these places. This commit also includes a test case written by Ying Yi as part of http://reviews.llvm.org/D12163 (that patch originally addressed this issue but was reverted because it introduced false positive regressions). Differential Revision: http://reviews.llvm.org/D12780 llvm-svn: 247859
* [WinEH] Fix a build issue in CGException.cppReid Kleckner2015-09-161-2/+1
| | | | | | I was constructing an object without filling in all the fields. llvm-svn: 247851
* [WinEH] Pass the catch adjectives to catchpad directlyReid Kleckner2015-09-168-58/+60
| | | | | | | | | This avoids building a fake LLVM IR global variable just to ferry an i32 down into LLVM codegen. It also puts a nail in the coffin of using MS ABI C++ EH with landingpads, since now we'll assert in the lpad code when flags are present. llvm-svn: 247843
* [sanitizers] Enable memory sanitizer on clangAdhemerval Zanella2015-09-161-1/+1
| | | | | | This patch enables MSan for aarch64/linux llvm-svn: 247808
* CGClass.cpp: Fix a warning in -Asserts. [-Wunused-private-field]NAKAMURA Takumi2015-09-161-0/+1
| | | | llvm-svn: 247778
* [modules] Fix a corner case in the macro override rules: properly handle ↵Richard Smith2015-09-161-2/+6
| | | | | | overridden leaf module macros. llvm-svn: 247765
* Implementation and testing for poisoning vtableNaomi Musgrave2015-09-161-17/+55
| | | | | | | | | | | | | | | | | | | | | | ptr in dtor. Summary: After destruction, invocation of virtual functions prevented by poisoning vtable pointer. Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12712 Fixed testing callback emission order to account for vptr. Poison vtable in either complete or base dtor, depending on if virtual bases exist. If virtual bases exist, poison in complete dtor. Otherwise, poison in base. Remove commented-out block. llvm-svn: 247762
* clang-format: In Java, `assert` is followed by an expression.Nico Weber2015-09-152-1/+3
| | | | | | Before: assert a&& b; Now: assert a && b; llvm-svn: 247750
* Don't crash when passing &@selector to a _Nonnull parameter. Fixes PR24774.Nico Weber2015-09-151-2/+3
| | | | | | | | | The root cause here is that ObjCSelectorExpr is an rvalue, yet it can have its address taken. That's kind of awkward, but fixing this is awkward in other ways, see https://llvm.org/bugs/show_bug.cgi?id=24774#c16 . For now, just fix the crash. llvm-svn: 247740
* Decorating vptr load & stores with !invariant.groupPiotr Padlewski2015-09-159-28/+69
| | | | | | | | | | Adding !invariant.group to vptr load/stores for devirtualization purposes. For more goto: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html http://reviews.llvm.org/D12026 llvm-svn: 247725
* Added llvm.module flag for strict vtable pointersPiotr Padlewski2015-09-151-0/+16
| | | | | | | | | | | | It is dangerous to do LTO on code with strict-vtable-pointers, because one module has invariant.group.barriers, and the other one not. In the future I want to just strip all invariant.group metadata from vptrs loads/stores and get rid of invariant.group.barrier calls. http://reviews.llvm.org/D12580 llvm-svn: 247724
* Emiting llvm.invariant.group.barrier when dynamic type changesPiotr Padlewski2015-09-154-3/+43
| | | | | | | | | For more goto: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html http://reviews.llvm.org/D12312 llvm-svn: 247723
* MS ABI: Don't allow dllexport/import on lambdasHans Wennborg2015-09-151-0/+8
| | | | | | | This is to follow up on David's comment in http://reviews.llvm.org/D12422#235509 llvm-svn: 247718
* Allow static local variables specified on data-sharing attribute clauses.Kelvin Li2015-09-151-1/+1
| | | | | | http://reviews.llvm.org/D11619 llvm-svn: 247715
* [OPENMP] Emit an additional note during analysis of 'if' clause.Alexey Bataev2015-09-151-1/+7
| | | | | | Patch adds emission of additional note for 'if' clauses with name modifiers in case if 'if' clause without name modified was specified or 'if' clause with the same name modifier was specified. llvm-svn: 247706
* Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and ↵Daniel Sanders2015-09-151-2/+2
| | | | | | | | related. NFC. Eric has replied and has demanded the patch be reverted. llvm-svn: 247702
* Silencing a -Wreturn-type warning; NFC.Aaron Ballman2015-09-151-0/+1
| | | | llvm-svn: 247693
* Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* ↵Daniel Sanders2015-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and related. NFC. Summary: This is the first patch in the series to migrate Triple's (which are ambiguous) to TargetTuple's (which aren't). For the moment, TargetTuple simply passes all requests to the Triple object it holds. Once it has replaced Triple, it will start to implement the interface in a more suitable way. This change makes some changes to the public C++ API. In particular, InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer() now take TargetTuples instead of Triples. The other public C++ API's have been left as-is for the moment to reduce patch size. This commit also contains a trivial patch to clang to account for the C++ API change. Thanks go to Pavel Labath for fixing LLDB for me. Reviewers: rengolin Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10969 llvm-svn: 247692
* Revert r247684 - Replace Triple with a new TargetTuple ...Daniel Sanders2015-09-151-2/+2
| | | | | | LLDB needs to be updated in the same commit. llvm-svn: 247686
* Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.Daniel Sanders2015-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first patch in the series to migrate Triple's (which are ambiguous) to TargetTuple's (which aren't). For the moment, TargetTuple simply passes all requests to the Triple object it holds. Once it has replaced Triple, it will start to implement the interface in a more suitable way. This change makes some changes to the public C++ API. In particular, InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer() now take TargetTuples instead of Triples. The other public C++ API's have been left as-is for the moment to reduce patch size. This commit also contains a trivial patch to clang to account for the C++ API change. Reviewers: rengolin Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10969 llvm-svn: 247683
* [OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only ↵Alexey Bataev2015-09-157-106/+192
| | | | | | | | | | | | | | if 'cancel' is found. Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then ``` if (__kmpc_cancel_barrier()) exit from outer construct; ``` code is generated. Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive. llvm-svn: 247681
* Run clang-format to unify the switch statement style as suggest here: ↵Alexey Bader2015-09-155-201/+539
| | | | | | | | http://reviews.llvm.org/D12855#246073. NFC. llvm-svn: 247678
* [OpenCL] Add new types for OpenCL 2.0.Alexey Bader2015-09-1516-0/+320
| | | | | | | | Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 llvm-svn: 247676
* Doxygen fix InitializeBuiltins -> initializeBuiltinsIsmail Donmez2015-09-151-1/+1
| | | | llvm-svn: 247668
* [analyzer] Restore behavior change introduced by r247657.Devin Coughlin2015-09-151-4/+6
| | | | | | | | r247657 fixed warnings about unused variables when compiling without asserts but changed behavior. This commit restores the old behavior but still suppresses the warnings. llvm-svn: 247660
* [MS ABI] Restore our warning for overwide bitfields using the MS ABIDavid Majnemer2015-09-151-19/+26
| | | | | | This restores a diagnostic lost in r247651. llvm-svn: 247659
* ExprEngineObjC.cpp: Fix warnings. [-Wunused-variable]NAKAMURA Takumi2015-09-151-4/+4
| | | | llvm-svn: 247657
* ItaniumCXXABI.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2015-09-151-2/+1
| | | | llvm-svn: 247655
* [modules] A using-declaration doesn't introduce a new entity, just a new nameRichard Smith2015-09-152-1/+7
| | | | | | | for an existing entity, and as such a using-declaration doesn't need to conflict with a hidden entity (nor vice versa). llvm-svn: 247654
* [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.Devin Coughlin2015-09-154-47/+129
| | | | | | | | | | | | | | | | | | | | | | | | | In Objective-C, method calls with nil receivers are essentially no-ops. They do not fault (although the returned value may be garbage depending on the declared return type and architecture). Programmers are aware of this behavior and will complain about a false alarm when the analyzer diagnoses API violations for method calls when the receiver is known to be nil. Rather than require each individual checker to be aware of this behavior and suppress a warning when the receiver is nil, this commit changes ExprEngineObjC so that VisitObjCMessage skips calling checker pre/post handlers when the receiver is definitely nil. Instead, it adds a new event, ObjCMessageNil, that is only called in that case. The CallAndMessageChecker explicitly cares about this case, so I've changed it to add a callback for ObjCMessageNil and moved the logic in PreObjCMessage that handles nil receivers to the new callback. rdar://problem/18092611 Differential Revision: http://reviews.llvm.org/D12123 llvm-svn: 247653
* [MS ABI] Overwide bool bitfields should be permittedDavid Majnemer2015-09-151-4/+7
| | | | | | | | Overwide bool bitfields have eight bits of storage size, make sure we take the padding into account when determining whether or not they are problematic. llvm-svn: 247651
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-09-157-126/+258
| | | | | | | | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479 and other bug caused in chrome. After this patch got reverted because of ScalarEvolution bug (D12719) Merged after John McCall big patch (Added Address). http://reviews.llvm.org/D11859 http://reviews.llvm.org/D12865 llvm-svn: 247646
* Prevent implicit re-interpret casts between ExtVector and Scalar types.Stephen Canon2015-09-151-0/+8
| | | | | | Previously, in certain cases lax vector conversions could occur between scalar floating-point values and ExtVector types; these conversions would be simple bitcasts. We need to allow them with other vector types to support some common headers, but we don't need them for ExtVector. Preventing them here makes them behave like other operations involving scalars and ExtVectors. llvm-svn: 247643
* [Solaris] Default to -fno-cxa-finalize.Rafael Espindola2015-09-141-6/+3
| | | | | | | | | | | There is no __cxa_finalize symbol available on recent Solaris OS versions, so we need this flag to make non trivial C++ programs run. Also stop looking for cxa_finalize.o, since it won't be there. Patch by Xan López! llvm-svn: 247634
* [WebAssembly] Define the atomic type sizesDan Gohman2015-09-141-4/+3
| | | | | | | | | | | | | WebAssembly's spec has now been updated to specify some guarantees about lock free atomic accesses. Update clang to match. This also updates sig_atomic_t to be 64-bit on wasm64. WebAssembly does not presently have asynchronous interrupts, but this change is within the spirit of how they will work if they are added. Differential Revision: http://reviews.llvm.org/D12862 llvm-svn: 247624
* [WebAssembly] Simplify code by avoiding duplicating the default behavior.Dan Gohman2015-09-141-1/+0
| | | | llvm-svn: 247623
* [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64Dan Gohman2015-09-141-0/+13
| | | | | | | | | This makes int_fast64_t and int_least64_t the same type as int64_t, and eliminates a difference between wasm32 and wasm64. Differential Revision: http://reviews.llvm.org/D12861 llvm-svn: 247622
* Revert "Always_inline codegen rewrite" and 2 follow-ups.Evgeniy Stepanov2015-09-146-127/+11
| | | | | | | | | | Revert "Update cxx-irgen.cpp test to allow signext in alwaysinline functions." Revert "[CodeGen] Remove wrapper-free always_inline functions from COMDATs" Revert "Always_inline codegen rewrite." Reason for revert: PR24793. llvm-svn: 247620
* PR24595: Ignore calling convention modifiers for structors in MS ABI.Andrey Bokhanko2015-09-143-12/+37
| | | | | | | | | | MS compiler ignores calling convention modifiers for structors. This patch makes clang do the same (for MS ABI). This fixes PR24595 and makes vswriter.h header (from Windows SDK 8.1) compilable. Differential Revision: http://reviews.llvm.org/D12402 llvm-svn: 247619
* C11 _Bool bitfield diagnosticRachel Craik2015-09-141-10/+10
| | | | | | | | | | | | Summary: Implement DR262 (for C). This patch will mainly affect bitfields of type _Bool Reviewers: fraggamuffin, rsmith Subscribers: hubert.reinterpretcast, cfe-commits Differential Revision: http://reviews.llvm.org/D10018 llvm-svn: 247618
* [Static Analyzer] Turn on some nullability checks by default.Gabor Horvath2015-09-141-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D12858 llvm-svn: 247614
* [Static Analyzer] Nullability checker optimization.Gabor Horvath2015-09-141-1/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D12848 llvm-svn: 247612
* Driver should forward at most one gdwarf-N flag to cc1as.Douglas Katzman2015-09-141-14/+9
| | | | llvm-svn: 247611
OpenPOWER on IntegriCloud