summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang getting started guide to require VC2013 instead of VS2012.Yaron Keren2015-05-071-2/+2
| | | | llvm-svn: 236733
* Adding new AST matcher: gnuNullExprSzabolcs Sipos2015-05-072-0/+9
| | | | | | It matches GNU __null expression. llvm-svn: 236731
* clang-format: Improve r236597, Properly indent method calls without inputs.Daniel Jasper2015-05-073-3/+9
| | | | | | | | | | | | Before: [aaaaaaaaaaaa(aaaaaa) aaaaaaaaaaaaaaaaaaaa]; After: [aaaaaaaaaaaa(aaaaaa) aaaaaaaaaaaaaaaaaaaa]; llvm-svn: 236730
* Implements a way to retrieve information about whether some lines were not ↵Manuel Klimek2015-05-075-42/+75
| | | | | | formatted due to syntax errors. llvm-svn: 236722
* AVX-512: FP compare intrinsics - changed type of CC parameter from i8 to i32 ↵Elena Demikhovsky2015-05-073-2/+92
| | | | | | | | according to the spec. Added FP compare intrinsics for SKX. llvm-svn: 236715
* Mark clang/test/CodeGenCXX/microsoft-abi-thread-safe-statics.cpp as ↵NAKAMURA Takumi2015-05-071-0/+2
| | | | | | REQUIRES:asserts. It relies on label names. llvm-svn: 236709
* Fix some glitches in the MSVCCompatibility documentDavid Majnemer2015-05-071-2/+2
| | | | | | | | - Fix the formatting of the "Exceptions and SEH" section. - Make the "Complete" text for "Thread-safe initialization of local statics" green. llvm-svn: 236706
* Fix for http://llvm.org/PR23392: magick/feature.c from ImageMagick-6.9.1-2 ICEs.Alexey Bataev2015-05-073-4/+15
| | | | | | | Fix for codegen of static variables declared inside of captured statements. Captured statements are actually a transparent DeclContexts, so we have to skip them when trying to get a mangled name for statics. Differential Revision: http://reviews.llvm.org/D9522 llvm-svn: 236701
* Note that we support 'throw' for the MS ABI.David Majnemer2015-05-071-2/+3
| | | | llvm-svn: 236698
* [MS ABI] Implement thread-safe initialization using the MSVC 2015 ABIDavid Majnemer2015-05-078-82/+310
| | | | | | | | | The MSVC 2015 ABI utilizes a rather straightforward adaptation of the algorithm found in the appendix of N2382. While we are here, implement support for emitting cleanups if an exception is thrown while we are intitializing a static local variable. llvm-svn: 236697
* [OPENMP] Generate !llvm.mem.loop_parallel_access metadata for loops with ↵Alexey Bataev2015-05-073-2/+16
| | | | | | | | | | dynamic/guided scheduling. Inner bodies of OpenMP worksharing loop-based constructs with dynamic or guided scheduling are allowed to be marked with !llvm.mem.parallel_loop_access metadata for better optimization. Worksharing constructs with static scheduling cannot be marked this way (according to OpenMP standard "A data dependence between the same logical iterations in two such loops is guaranteed"). Constructs with auto and runtime scheduling are also not marked because automatically chosen scheduling may be static also. Differential Revision: http://reviews.llvm.org/D9518 llvm-svn: 236693
* [OPENMP] Fixed test for reduction on 'sections' directive.Alexey Bataev2015-05-071-1/+1
| | | | llvm-svn: 236692
* fix clang-fuzzer and clang-format-fuzzer Kostya Serebryany2015-05-072-2/+2
| | | | llvm-svn: 236691
* [modules] Suport for merging a parsed enum definition into an existing ↵Richard Smith2015-05-077-25/+93
| | | | | | imported but not visible definition. llvm-svn: 236690
* [OPENMP] Fixed codegen for 'reduction' clause.Alexey Bataev2015-05-075-114/+118
| | | | | | | | Fixed codegen for reduction operations min, max, && and ||. Codegen for them is quite similar and I was confused by this similarity. Also added a call to kmpc_end_reduce() in atomic part of reduction codegen (call to kmpc_end_reduce_nowait() is not required). Differential Revision: http://reviews.llvm.org/D9513 llvm-svn: 236689
* When performing delayed typo correction in a for-range loop's variableKaelyn Takata2015-05-072-0/+18
| | | | | | | declaration, ensure the loop variable is properly marked as invalid when it is an "auto" variable. llvm-svn: 236682
* Fix public-private.modulemap test case to clear the cache on every run.Peter Collingbourne2015-05-061-2/+3
| | | | llvm-svn: 236655
* CGCXX: Use cast in getAddrOfCXXStructor()Duncan P. N. Exon Smith2015-05-061-2/+1
| | | | | | | | All callers should be passing `CXXConstructorDecl` or `CXXDestructorDecl` here, so use `cast<>` instead of `dyn_cast<>` when setting up the `GlobalDecl`. llvm-svn: 236651
* [docs] Update SanitizerCoverage docs.Sergey Matveev2015-05-061-6/+12
| | | | llvm-svn: 236641
* clang-format: Don't indent 'signals' as access specifier if it isn't oneDaniel Jasper2015-05-062-1/+6
| | | | | | | | | | | | | | Before: { signals.set(0); } After: { signals.set(0); } llvm-svn: 236630
* [driver] Cosmetic change to use Input instead of Inputs[0].Artem Belevich2015-05-062-14/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D9506 llvm-svn: 236621
* [AArch64] Advertise that the __sync_*_compare_and_swap_1/2/4/8 builtins workReid Kleckner2015-05-061-0/+6
| | | | | | | Fixes PR23428, where std::thread in libstdc++ would go haywire without these defines. llvm-svn: 236605
* clang-format: Merge labels and subsequent semicolons.Daniel Jasper2015-05-063-1/+13
| | | | | | | | | | | E.g.: default:; This can be used to get around restrictions as to what can follow a label. It fixes llvm.org/PR19648. llvm-svn: 236604
* clang-format: Allow ternary expressions inside template parameters ifDaniel Jasper2015-05-062-2/+9
| | | | | | | | the template parameters aren't inside an expression context. This fixes llvm.org/PR23270. llvm-svn: 236603
* clang-format: Consider operator precedence as penalty when breakingDaniel Jasper2015-05-062-0/+7
| | | | | | | | before operators. This fixes llvm.org/23382. llvm-svn: 236602
* clang-format: Accept slightly more record declarations.Daniel Jasper2015-05-062-28/+32
| | | | | | This fixes llvm.org/PR23397. llvm-svn: 236599
* clang-format: Fix bad wrapping of ObjC method exprs.Daniel Jasper2015-05-062-3/+10
| | | | | | | | | | | | | | | | | Before: [aaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa: aaaaaaaa aaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]; After: [aaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa:aaaaaaaa aaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]; Note that this might now violate the column limit and we probably need an alternative way of indenting these then. However, that is still strictly better than the messy formatting that clang-format did before. llvm-svn: 236598
* clang-format: Properly indent method calls without inputs.Daniel Jasper2015-05-062-2/+6
| | | | | | | | | | | | Before: [aaaaaaaaaaa aaaaaaa]; After: [aaaaaaaaaaa aaaaaaa]; llvm-svn: 236597
* Remove deprecated version of reformat.Manuel Klimek2015-05-062-17/+0
| | | | llvm-svn: 236594
* clang-format: Don't allow -i when reading from stdin.Daniel Jasper2015-05-061-1/+3
| | | | llvm-svn: 236592
* Remove all computation of structural errors in clang-format's line parser.Manuel Klimek2015-05-063-28/+10
| | | | | | We were already ignoring those already. llvm-svn: 236591
* clang-format: Fix another assertion discovered by the fuzzer.Daniel Jasper2015-05-062-14/+19
| | | | | | | | | In the process, fix an old todo that I don't really know how to write tests for. The problem is that Clang's lexer creates very strange token sequences for these. However, the new approach seems generally better and easier to read so I am submitting it nonetheless. llvm-svn: 236589
* clang-format: Prevent assertion discovered by fuzzer.Daniel Jasper2015-05-062-2/+12
| | | | llvm-svn: 236578
* clang-format: Prevent exponential runtime in token annotator.Daniel Jasper2015-05-062-1/+12
| | | | llvm-svn: 236577
* [OPENMP] Fixed messages about predetermined DSA for loop control variables.Alexey Bataev2015-05-062-4/+11
| | | | llvm-svn: 236574
* clang-format: Fix bug in multiline comment wrapping.Daniel Jasper2015-05-062-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Splitting: /** * multiline block comment * */ Before: /** * multiline block *comment * */ After: /** * multiline block * comment * */ The reason was that the empty line inside the comment (with just the "*") was confusing the comment breaking logic. llvm-svn: 236573
* [OPENMP] Fix for http://llvm.org/PR23387: clang fails to compile ↵Alexey Bataev2015-05-062-2/+22
| | | | | | | | magick/attribute.c Allow to use variables with 'register' storage class as loop control variables in OpenMP loop based constructs. llvm-svn: 236571
* Revert "[analyzer] scan-build: support spaces in compiler path and arguments."Ahmed Bougacha2015-05-061-5/+1
| | | | | | | | This reverts commit r236423 and its followup r236533, as indiscriminate quoting makes for too much quoting (and clang doesn't like both '"-c"' and -D"FOO=bar"). llvm-svn: 236562
* InstrProf: Don't start or end coverage regions inside of system macrosJustin Bogner2015-05-052-4/+16
| | | | | | | | | | | It doesn't make much sense to try to show coverage inside system macros, and source locations in builtins confuses the coverage mapping. Just avoid doing this. Fixes an assert that fired when a __block storage specifier starts a region. llvm-svn: 236547
* Update testcase to match r236539David Majnemer2015-05-051-1/+1
| | | | llvm-svn: 236542
* [analyzer] This eliminates regression caused by r236423.Anton Yartsev2015-05-051-1/+5
| | | | | | Wrap an argument with quotes only if it has spaces. llvm-svn: 236533
* [SystemZ] Add support for z13 low-level vector builtinsUlrich Weigand2015-05-055-1/+1257
| | | | | | | | | | | | | | | | | | | | | | | | | This adds low-level builtins to allow access to all of the z13 vector instructions. Note that instructions whose semantics can be described by standard C (including clang extensions) do not get any builtins. For each instructions whose semantics *cannot* (fully) be described, we define a builtin named __builtin_s390_<insn> that directly maps to this instruction. These are intended to be compatible with GCC. For instructions that also set the condition code, the builtin will take an extra argument of type "int *" at the end. The integer pointed to by this argument will be set to the post-instruction CC value. For many instructions, the low-level builtin is mapped to the corresponding LLVM IR intrinsic. However, a number of instructions can be represented in standard LLVM IR without requiring use of a target intrinsic. Some instructions require immediate integer operands within a certain range. Those are verified at the Sema level. Based on a patch by Richard Sandiford. llvm-svn: 236532
* [SystemZ] Add support for z13 and its vector facilityUlrich Weigand2015-05-058-30/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the z13 architecture type. For compatibility with GCC, a pair of options -mvx / -mno-vx can be used to selectively enable/disable use of the vector facility. When the vector facility is present, we default to the new vector ABI. This is characterized by two major differences: - Vector types are passed/returned in vector registers (except for unnamed arguments of a variable-argument list function). - Vector types are at most 8-byte aligned. The reason for the choice of 8-byte vector alignment is that the hardware is able to efficiently load vectors at 8-byte alignment, and the ABI only guarantees 8-byte alignment of the stack pointer, so requiring any higher alignment for vectors would require dynamic stack re-alignment code. However, for compatibility with old code that may use vector types, when *not* using the vector facility, the old alignment rules (vector types are naturally aligned) remain in use. These alignment rules are not only implemented at the C language level, but also at the LLVM IR level. This is done by selecting a different DataLayout string depending on whether the vector ABI is in effect or not. Based on a patch by Richard Sandiford. llvm-svn: 236531
* Allow TransformTypos to ignore corrections to a specified VarDecl.Kaelyn Takata2015-05-055-12/+57
| | | | | | | | | | | | | This is needed to prevent a TypoExpr from being corrected to a variable when the TypoExpr is a subexpression of that variable's initializer. Also exclude more keywords from the correction candidate pool when the subsequent token is .* or ->* since keywords like "new" or "return" aren't valid on the left side of those operators. Fixes PR23140. llvm-svn: 236519
* [OPENMP] Allow use of macros in OpenMP directives/clauses.Alexey Bataev2015-05-052-1/+5
| | | | llvm-svn: 236493
* [OPENMP] Fixed incorrect work with cleanups, NFC.Alexey Bataev2015-05-051-17/+24
| | | | | | | Destructors are never called for cleanups, so we can't use SmallVector as a member. Differential Revision: http://reviews.llvm.org/D9399 llvm-svn: 236491
* Revert revision 236487: [OPENMP] Fixed incorrect work with cleanups, NFC.Alexey Bataev2015-05-051-19/+17
| | | | llvm-svn: 236490
* clang-format: [JS] support optional methods.Daniel Jasper2015-05-053-22/+58
| | | | | | | | | | | | | | | Optional methods use ? tokens like this: interface X { y?(): z; } It seems easiest to detect and disambiguate these from ternary expressions by checking if the code is in a declaration context. Turns out that that didn't quite work properly for interfaces in Java and JS, and for JS file root contexts. Patch by Martin Probst, thank you. llvm-svn: 236488
* [OPENMP] Fixed incorrect work with cleanups, NFC.Alexey Bataev2015-05-051-17/+19
| | | | | | | Destructors are never called for cleanups, so we can't use SmallVector as a member. Differential Revision: http://reviews.llvm.org/D9399 llvm-svn: 236487
* clang-format: [JS] Do not collapse short interfaces.Daniel Jasper2015-05-052-1/+8
| | | | | | Patch by Martin Probst. llvm-svn: 236485
OpenPOWER on IntegriCloud