- Dec 14, 2016
-
-
Reid Kleckner authored
r289225 broke AST invariants by reparenting enumerators into function decl contexts. This improves things by only reparenting TagDecls while also attempting to preserve the lexical declcontext chain. The interesting example here is: int f(struct S { enum E { a = 1 } b; } c); The semantic contexts of E and S should be f, and the lexical context of S should be f and the lexical context of E should be S. We didn't do that with r289225, but now we should. This change should also improve our behavior on this example: void f() { extern void ext(struct S { } o); // S injected here } Before r289225 we would only remove 'S' from the surrounding tag injection context if it was the TU, but now we properly reparent S from f to ext. Fixes PR31366 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289678 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dehao Chen authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289675 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dehao Chen authored
Summary: We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from clang to llvm pass manager builder. Reviewers: tejohnson, davidxl, dnovillo Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D27744 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289670 91177308-0d34-0410-b5e6-96231b3b80d8
-
Petr Hosek authored
This change allows setting the default linker used by the Clang driver when configuring the build. Differential Revision: https://reviews.llvm.org/D25263 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289668 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sylvestre Ledru authored
Summary: I also proposed the change in Firefox .clang-format file: https://bugzilla.mozilla.org/show_bug.cgi?id=1322321 Reviewers: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27557 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289660 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kelvin Li authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289657 91177308-0d34-0410-b5e6-96231b3b80d8
-
Neil Hickey authored
The function SemaBuiltinFPClassification removed superfluous float to double casts, this was changed to also remove float to float casts but this isn't valid in all cases, for example when doing an rvaluetolvalue cast. Added a check to only remove if this was a conventional floating cast. Added additional tests into SemaOpenCL/extensions to cover these cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289650 91177308-0d34-0410-b5e6-96231b3b80d8
-
Stephan Bergmann authored
At least the plugin used by the LibreOffice build (<https://wiki.documentfoundation.org/Development/Clang_plugins>) indirectly uses those members (through inline functions in LLVM/Clang include files in turn using them), but they are not exported by utils/extract_symbols.py on Windows, and accessing data across DLL/EXE boundaries on Windows is generally problematic. Differential Revision: https://reviews.llvm.org/D26671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289647 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289630 91177308-0d34-0410-b5e6-96231b3b80d8
-
Paul Robinson authored
In r267772, we had set the PS4's default dialect for both C and Objective-C to gnu99. Make that change only for C; we don't really support Objective-C/C++ so there's no point fiddling the dialect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289625 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
cleanup loop for exception handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289623 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
Differential Revision: https://reviews.llvm.org/D27313 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289621 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
copy constructors of classes with array members, instead using ArrayInitLoopExpr to represent the initialization loop. This exposed a bug in the static analyzer where it was unable to differentiate between zero-initialized and unknown array values, which has also been fixed here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289618 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
fragile runtime too. Follow-up to r258962. rdar://problem/29269006 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289615 91177308-0d34-0410-b5e6-96231b3b80d8
-
Evandro Menezes authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289614 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 13, 2016
-
-
Peter Collingbourne authored
This annotation allows the optimizer to split vtable groups, as permitted by a change to the Itanium ABI [1] that prevents compilers from adjusting virtual table pointers between virtual tables. [1] https://github.com/MentorEmbedded/cxx-abi/pull/7 Differential Revision: https://reviews.llvm.org/D24431 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289585 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
In a future change, this representation will allow us to use the new inrange annotation on getelementptr to allow the optimizer to split vtable groups. Differential Revision: https://reviews.llvm.org/D22296 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289584 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
32-bit MSVC doesn't provide more than 4 byte stack alignment by default. This conflicts with PointerUnion's attempt to make assertions about alignment. This fixes the problem by explicitly asking the compiler for 8 byte alignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289575 91177308-0d34-0410-b5e6-96231b3b80d8
-
George Burgess IV authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289571 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Although not specifically mentioned in the documentation, MSVC accepts __uuidof(…) and declspec(uuid("…")) attributes on enumeration types in addition to structs/classes. This is meaningful, as such types *do* have associated UUIDs in ActiveX typelibs, and such attributes are included by default in the wrappers generated by their #import construct, so they are not particularly unusual. clang currently rejects the declspec with a –Wignored-attributes warning, and errors on __uuidof() with “cannot call operator __uuidof on a type with no GUID” (because it rejected the uuid attribute, and therefore finds no value). This is causing problems for us while trying to use clang-tidy on a codebase that makes heavy use of ActiveX. I believe I have found the relevant places to add this functionality, this patch adds this case to clang’s implementation of these MS extensions. patch is against r285994 (or actually the git mirror 80464680). Both include an update to test/Parser/MicrosoftExtensions.cpp to exercise the new functionality. This is my first time contributing to LLVM, so if I’ve missed anything else needed to prepare this for review just let me know! __uuidof: https://msdn.microsoft.com/en-us/library/zaah6a61.aspx declspec(uuid("…")): https://msdn.microsoft.com/en-us/library/3b6wkewa.aspx #import: https://msdn.microsoft.com/en-us/library/8etzzkb6.aspx Reviewers: aaron.ballman, majnemer, rnk Differential Revision: https://reviews.llvm.org/D26846 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289567 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
When an Objective-C property has a (copy) attribute, the default setter for this property performs a -copy on the object assigned. Calling -copy on a mutable NS object such as NSMutableString etc. produces an immutable object, NSString in our example. Hence the getter becomes type-incorrect. rdar://problem/21022397 Differential Revision: https://reviews.llvm.org/D27535 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289554 91177308-0d34-0410-b5e6-96231b3b80d8
-
Zachary Turner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289553 91177308-0d34-0410-b5e6-96231b3b80d8
-
Neil Hickey authored
Adding -triple option to ensure target supports double for fpmath test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289552 91177308-0d34-0410-b5e6-96231b3b80d8
-
Neil Hickey authored
Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64. This change makes sure single-precision floating point types are used if the cl_fp64 extension is not supported by the target. Also removed the check to see whether the OpenCL version is >= 1.2, as this has been incorporated into the extension setting code. Differential Revision: https://reviews.llvm.org/D24235 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289544 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289543 91177308-0d34-0410-b5e6-96231b3b80d8
-
Egor Churaev authored
Reviewers: Anastasia Subscribers: bader, yaxunl, cfe-commits Differential Revision: https://reviews.llvm.org/D27671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289536 91177308-0d34-0410-b5e6-96231b3b80d8
-
Egor Churaev authored
Summary: Although the feature was introduced only in OpenCL C v2.0 spec., it's useful for OpenCL 1.x too and doesn't require HW support. Reviewers: Anastasia Subscribers: yaxunl, cfe-commits, bader Differential Revision: https://reviews.llvm.org/D27453 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289535 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
We have previously done that for <<-operators. This patch also adds this logic for "," and "+". Before: string v = "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa; string v = StrCat("aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa); After: string v = "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa + "aaaaaaaaaaaaaaaa: " + aaaaaaaaaaaaaaaa; string v = StrCat("aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa, "aaaaaaaaaaaaaaaa: ", aaaaaaaaaaaaaaaa); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289531 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: vector<int> v { 12 } GUARDED_BY(mutex); After: vector<int> v{12} GUARDED_BY(mutex); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289525 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
lib/CodeGen/CGExpr.cpp:2511:2: warning: extra ';' [-Wpedantic] }; ^ Clean up warning from gcc 6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289514 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dominic Chen authored
Summary: Split out formatting and style changes from D26061 Reviewers: zaks.anna, dcoughlin Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26691 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289511 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
Reverts commit r289478. This broke http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2070 (and maybe http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/2246) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289494 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
Reverts r289181: it's currently breaking modules using simd.h in 10.12 SDK. This reverts commit 6e73e346. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289487 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 12, 2016
-
-
Bruno Cardoso Lopes authored
Sort the headers by name before adding the includes in collectModuleHeaderIncludes. This makes the include order for building umbrellas deterministic across different filesystems and also guarantees that the ASTWriter always dump top headers in the same order. There's currently no good way to test for this behavior. rdar://problem/28116411 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289478 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
Collect the necessary input PCH files. Do not try to validate the AST before copying it out because if the crash is in this path, we won't be able to collect it. Instead only check if it's a file containg an AST. rdar://problem/27913709 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289460 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
Use the vfs lookup instead of real filesytem and handle the case where -include-pch is a directory and this dir is searched for a PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289459 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289458 91177308-0d34-0410-b5e6-96231b3b80d8
-
Michael Kuperstein authored
This was accidentally removed in r260506, even though we only support non-allocatable global register variables. The general (allocatable) case is explicitly not supported. Differential Revision: https://reviews.llvm.org/D27473 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289455 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
Apparently this routine isn't available on some Android platforms. See the mailing list thread re: D21695. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289452 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289450 91177308-0d34-0410-b5e6-96231b3b80d8
-