summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Thread Safety Analysis: fix before/after checks so that they work on globalDeLesley Hutchins2015-09-294-2/+18
| | | | | | variables as well member variables. llvm-svn: 248803
* clang-format: Add a new brace style "custom" as well as flags toDaniel Jasper2015-09-298-60/+254
| | | | | | | | | | | | | | | control the individual braces. The existing choices for brace wrapping are now merely presets for the different flags that get expanded upon calling the reformat function. All presets have been chose to keep the existing formatting, so there shouldn't be any difference in formatting behavior. Also change the dump_format_style.py to properly document the nested structs that are used to keep these flags discoverable among all the configuration flags. llvm-svn: 248802
* clang-format: Extend #include sorting functionalityDaniel Jasper2015-09-294-22/+99
| | | | | | | | | Recognize the main module header as well as different #include categories. This should now mimic the behavior of llvm/utils/sort_includes.py as well as clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp very closely. llvm-svn: 248782
* Revert part of r248776. One of the changes worked on my local build, but not ↵Craig Topper2015-09-291-1/+1
| | | | | | on the bots. llvm-svn: 248778
* Simplify or remove calls to makeArrayRef based on feedback from David ↵Craig Topper2015-09-292-3/+3
| | | | | | Blaikie. NFC. llvm-svn: 248776
* Honor the casted-to alignment of an explicit cast even whenJohn McCall2015-09-292-1/+8
| | | | | | | | | Sema thinks the cast is a no-op, as it does when (e.g.) the only thing that changes is an alignment attribute. Fixed PR24944. llvm-svn: 248775
* Remove 'const' from some ArrayRef arguments since they're passed by value ↵Craig Topper2015-09-291-6/+5
| | | | | | anyway. NFC llvm-svn: 248774
* Pass ArrayRef by value. NFC.Craig Topper2015-09-291-1/+1
| | | | llvm-svn: 248773
* [OPENMP 4.1] Codegen for ‘simd’ clause in ‘ordered’ directive.Alexey Bataev2015-09-294-8/+45
| | | | | | | | | | | Description. If the simd clause is specified, the ordered regions encountered by any thread will use only a single SIMD lane to execute the ordered regions in the order of the loop iterations. Restrictions. An ordered construct with the simd clause is the only OpenMP construct that can appear in the simd region. An ordered directive with ‘simd’ clause is generated as an outlined function and corresponding function call to prevent this part of code from vectorization later in backend. llvm-svn: 248772
* Unique-pointerify these pointers an plug a memory leak.Adrian Prantl2015-09-282-11/+4
| | | | | | Thanks to echristo for noticing! llvm-svn: 248762
* Remove the only use of LookupResult's implicit copy ctorDavid Blaikie2015-09-281-0/+11
| | | | | | | | | | | | | | | | | | | | | LookupResult should not be copyable, it's not readily copyable and can only be copied when it's in specific states (in a query state, without any results, basically). Instead, just extract the /query/ state and pass that across the copy boundary, then build a new LookupResult on the other side. I wonder if a better API (one in which the query state is separate from the result state - essentialyl making QueryState a first class part of the Lookup API - pass a QueryState, get a LookupResult, rather than mutating the LookupResult in place (LookupResult could contain a QueryState if it's particularly helpful to be able to observe the query parameters while also examining the result)) might be a good idea here. Future patches will probably make LookupResult actually non-copyable (transition the CXXBasePaths to unique_ptr, for example) and hopefully we'll enable -Wdeprecated in LLVM soon to avoid issues like this. llvm-svn: 248761
* Add an explicitly defaulted copy ctor (and FIXME) to Command since its copy ↵David Blaikie2015-09-281-0/+3
| | | | | | | | ctor is currently used (and actually slices derived objects... ) in some diagnostics handling. Justin mentioned he'd look into this. llvm-svn: 248760
* Remove trivial dtor that was making uses of the copy ctor -Wdeprecated uncleanDavid Blaikie2015-09-281-2/+1
| | | | | | | And also remove an unused variable that's now diagnosed by -Wunused-variable since the dtor is now trivial. llvm-svn: 248759
* [CUDA] 32-bit NVPTX should have 32-bit long type.Artem Belevich2015-09-285-19/+19
| | | | | | | | | Currently it's 64-bit which will lead to mismatch between host and device code if we compile for i386. Differential Revision: http://reviews.llvm.org/D13181 llvm-svn: 248753
* Generate assume loads only with -fstrict-vtable-pointersPiotr Padlewski2015-09-282-3/+7
| | | | | | | Temporary fix till InstCombine and other possible passes will be efficient to handle multiple assumes. llvm-svn: 248734
* clang-format: [JS] Support pseudo-keywordsDaniel Jasper2015-09-283-1/+19
| | | | | | | | | JavaScript allows keywords to appear in IdenfierName positions, e.g. fields, or object literal members, but not as plain identifiers. Patch by Martin Probst. Thank you! llvm-svn: 248714
* clang-format: [JS] handle let (ES6)Daniel Jasper2015-09-284-4/+9
| | | | | | Patch by Martin Probst. Thank you! llvm-svn: 248713
* [OPENMP 4.1] Add 'simd' clause for 'ordered' directive.Alexey Bataev2015-09-2817-7/+289
| | | | | | | | | | | Parsing and sema analysis for 'simd' clause in 'ordered' directive. Description If the simd clause is specified, the ordered regions encountered by any thread will use only a single SIMD lane to execute the ordered regions in the order of the loop iterations. Restrictions An ordered construct with the simd clause is the only OpenMP construct that can appear in the simd region llvm-svn: 248696
* Use llvm::makeArrayRef. NFC.Craig Topper2015-09-275-6/+6
| | | | llvm-svn: 248678
* clang/test/Driver/arm-compiler-rt.c: Relax expressions for dos path.NAKAMURA Takumi2015-09-261-7/+7
| | | | llvm-svn: 248666
* Revert part of r248660 as using None didn't work with the ArrayRef being ↵Craig Topper2015-09-261-2/+2
| | | | | | returned as an Optional. llvm-svn: 248661
* Use None to avoid re-mentioning the ArrayRef type to call the default ↵Craig Topper2015-09-263-5/+5
| | | | | | constructor. llvm-svn: 248660
* Remove move constructor and assignment operator from SourceMappingRegion. ↵Craig Topper2015-09-261-12/+1
| | | | | | The types of the fields are trivially copyable. NFC llvm-svn: 248659
* Fix a couple other places that were returning SourceLocation by reference. NFCCraig Topper2015-09-261-2/+2
| | | | llvm-svn: 248658
* Driver: support ARM/HF on a single toolchainSaleem Abdulrasool2015-09-264-22/+58
| | | | | | | | | | | | | | | | | ARM EABI adds target attributes to the object file. Amongst the attributes that are emitted is the VFP argument passing (Hard vs Soft). The linker is responsible for checking these attributes and erroring on mismatches. This causes problems for the compiler-rt builtins when targeting both hard and soft. Because both of these options name the builtins compiler-rt component the same (libclang_rt.builtins-arm.a or libclang_rt.builtins-arm-android). GCC is able to get away with this as it does one target per toolchain. This changes the naming convention for the ARM compiler-rt builtins to differentiate between HF and Soft. Although this means that compiler-rt may be duplicated, it enables supporting both variants from a single toolchain. A similar approach is taken by the Darwin toolchain, naming the library to differentiate between the calling conventions. llvm-svn: 248649
* Replace a loop and temporary string copying with llvm::join.Eric Christopher2015-09-261-7/+3
| | | | llvm-svn: 248645
* Change arc-cxx11-init-list.mm to work with upcoming SCEV changes.Sanjoy Das2015-09-251-2/+0
| | | | | | | | | | | | | | | Summary: The store being checked for in arc-cxx11-init-list.mm is a store to an unescaped alloca. After an uncoming change to ScalarEvolution, LLVM is able to elide the store, so adjust the test accordingly. Reviewers: compnerd Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13183 llvm-svn: 248632
* Relax test to allow for __attribute__((thiscall)). Under Win32 c-index-test ↵Yaron Keren2015-09-251-2/+2
| | | | | | | | | output is CXXMethod=foo:4:7 (unavailable) [type=int () __attribute__((thiscall))] [typekind=FunctionProto] [resulttype=int] [resulttypekind=Int] [isPOD=0] CXXConstructor=Foo:5:3 (unavailable) [type=void () __attribute__((thiscall))] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0] llvm-svn: 248626
* Fix bug on reporting availability of deleted methods in libclang.Manuel Klimek2015-09-252-1/+14
| | | | | | Patch by Sergey Kalinichev. llvm-svn: 248596
* Make incomplete type errors better with enable_ifGeorge Burgess IV2015-09-252-11/+24
| | | | | | | | | | | | This patch fixes the order in which we evaluate the different ways that a function call could be disallowed. Now, if you call a non-overloaded function with an incomplete type and failing enable_if, we'll prioritize reporting the more obvious error (use of incomplete type) over reporting the failing enable_if. Thanks to Ettore Speziale for the patch! llvm-svn: 248595
* The Clang gcc-compatible driver (clang/tools/driver/driver.cpp) has someEric Christopher2015-09-253-93/+124
| | | | | | | | | | | | | | | | | | | | | | | logic to select an alternate target based on the executable it was called as. For instance, if you symlink i686-linux-android-gcc to clang and invoke it, the driver will act as though it were called with another argument ("-target i686-linux-android"). This leads to visible effects even in syntax-only compilations (like the ANDROID preprocessor symbol being defined). This behavior is not replicated for tool invocations--for instance, clang::createInvocationFromCommandLine will not choose an alternate target based on ArgList[0]. This means that configurations stored in compilation databases aren't accurately replayed. This patch separates the logic for selecting a mode flag and target from the executable name into a new member function on ToolChain. It should have no functional effects (but will allow other code to reuse the target/mode selection logic). Patch by Luke Zarko! llvm-svn: 248592
* Revert "This patch adds missing pieces to clang, including the PS4 toolchain ↵Greg Bedwell2015-09-2517-705/+8
| | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." This reverts commit r248546 to get our bot green again while we discuss the best way forward. llvm-svn: 248578
* [OPENMP 4.1] Add 'threads' clause for '#pragma omp ordered'.Alexey Bataev2015-09-2521-35/+258
| | | | | | | | OpenMP 4.1 extends format of '#pragma omp ordered'. It adds 3 additional clauses: 'threads', 'simd' and 'depend'. If no clause is specified, the ordered construct behaves as if the threads clause had been specified. If the threads clause is specified, the threads in the team executing the loop region execute ordered regions sequentially in the order of the loop iterations. The loop region to which an ordered region without any clause or with a threads clause binds must have an ordered clause without the parameter specified on the corresponding loop directive. llvm-svn: 248569
* New test ps4-linker-win.c (added in r48546) is causing problems for Windows ↵Ekaterina Romanova2015-09-251-26/+0
| | | | | | bots. I'm deleting this file during investigation. llvm-svn: 248567
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-09-2418-8/+731
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D11279 llvm-svn: 248546
* Move the darwin define static function to be close to the OS define.Eric Christopher2015-09-241-24/+23
| | | | llvm-svn: 248539
* Use just one larger anonymous namespace instead of a lot of smaller ones.Eric Christopher2015-09-241-15/+0
| | | | llvm-svn: 248538
* fix typos; NFCSanjay Patel2015-09-241-3/+3
| | | | llvm-svn: 248537
* Recommit r248154: [ARM] Handle DSP feature as an ArchExtKindArtyom Skrobov2015-09-242-22/+22
| | | | | | | | | | | | | | | | Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME: attached. http://reviews.llvm.org/D12937 moved the handling of the DSP feature over to ARMTargetParser.def in LLVM, to be in line with other architecture extensions. This is the corresponding patch to clang, to clear the FIXME: and update the tests. Differential Revision: http://reviews.llvm.org/D12938 llvm-svn: 248521
* Enable SafeStack on all Linux platforms.Evgeniy Stepanov2015-09-242-1/+3
| | | | llvm-svn: 248518
* [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire ↵Devin Coughlin2015-09-244-11/+1096
| | | | | | | | | | | | | | | | | | | | region. Change the analyzer's modeling of memcpy to be more precise when copying into fixed-size array fields. With this change, instead of invalidating the entire containing region the analyzer now invalidates only offsets for the array itself when it can show that the memcpy stays within the bounds of the array. This addresses false positive memory leak warnings of the kind reported by krzysztof in https://llvm.org/bugs/show_bug.cgi?id=22954 (This is the second attempt, now with assertion failures resolved.) A patch by Pierre Gousseau! Differential Revision: http://reviews.llvm.org/D12571 llvm-svn: 248516
* Module Debugging: Emit submodules as nested DW_TAG_modules.Adrian Prantl2015-09-245-13/+35
| | | | llvm-svn: 248511
* Debug Info: Use the module pointer as key for the module cache.Adrian Prantl2015-09-243-6/+11
| | | | | | This way we don't need to rebuild the full module name for every decl. llvm-svn: 248510
* Refactor ASTSourceDescriptor to not store copies of all strings. (NFC)Adrian Prantl2015-09-243-14/+29
| | | | llvm-svn: 248509
* Drop useless const in for-range loops.Benjamin Kramer2015-09-244-11/+11
| | | | | | | | StringRefs always point to immutable memory so the const doesn't add value here. Also quiets clang's -Wrange-loop-analysis which warns about the implicit copying. llvm-svn: 248496
* [Driver] Don't implicitly copy std::strings in for-range loop.Benjamin Kramer2015-09-241-1/+1
| | | | | | Found by -Wrange-loop-analysis. llvm-svn: 248495
* [mips] Relax -mnan=2008 acceptance to permit MIPS32R2 and MIPS64R2.Daniel Sanders2015-09-242-15/+38
| | | | | | | | | | | | | | | Summary: Strictly speaking, the MIPS*R2 ISA's should not permit -mnan=2008 since this feature was added in MIPS*R3. However, other toolchains permit this and we should do the same. Reviewers: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13057 llvm-svn: 248481
* [ARM] Follow-up to fix crash "-target arm -mcpu=generic", without "-march="Vladimir Sukharev2015-09-241-1/+1
| | | | | | | | | | | Fix of dangling StringRef after temporary std::string is destroyed Follow-up to: http://reviews.llvm.org/rL248479 Reviewers: alexfh Subscribers: cfe-commits llvm-svn: 248480
* [ARM] Follow-up to fix crash "-target arm -mcpu=generic", without "-march="Vladimir Sukharev2015-09-241-3/+3
| | | | | | | | | | | Fix of dangling StringRef after temporary std::string is destroyed Follow-up to: http://reviews.llvm.org/rL248370 Reviewers: alexfh Subscribers: cfe-commits llvm-svn: 248479
* [Driver] Add support for Windows 10 SDKIgor Kudrin2015-09-242-68/+102
| | | | | | | | | | | | | | | | Summary: With Windows 10 SDK, Include and Lib directories now contain an additional subfolder with the name that corresponds to the full version of the SDK, for example: - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x64 Reviewers: ruiu, rnk Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D12832 llvm-svn: 248463
OpenPOWER on IntegriCloud