summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: Fix regression introduced in r221609.Daniel Jasper2014-11-171-1/+2
| | | | | | | | | | Before: void f() { f(a, c *d); } After: void f() { f(a, c * d); } llvm-svn: 222128
* [Sanitizer] Parse and produce all sanitizer-relevant arguments in SanitizerArgs.Alexey Samsonov2014-11-162-61/+61
| | | | | | | | | | | | | In particular, make SanitizerArgs responsible for parsing and passing down to frontend -fsanitize-recover and -fsanitize-undefined-trap-on-error flags. Simplify parsing -f(no-)sanitize= flags parsing: get rid of too complex filterUnsupportedKinds function. No functionality change. llvm-svn: 222105
* Fix issues missed during the review of r222099.Richard Trieu2014-11-151-15/+17
| | | | | | | Shift some functions around, make a method in Sema private, call the correct overloaded function. No functional change. llvm-svn: 222081
* Fix IRGen for passing transparent unionsReid Kleckner2014-11-151-0/+23
| | | | | | | | | We have had a test for this for a long time with a FIXME saying what we should be doing. This just does it. Fixes PR21573. llvm-svn: 222074
* CGDebugInfo: Update for DIBuilder API changeDuncan P. N. Exon Smith2014-11-151-5/+7
| | | | | | Tracking LLVM commit r222070. llvm-svn: 222071
* This patch fixes couple of bugs for predefined expressionFariborz Jahanian2014-11-142-12/+17
| | | | | | | | | used inside blocks. It fixes a crash in naming code for __func__ etc. when used in a block declared globally. It also brings back old naming convention for predefined expression which was broken. rdar://18961148 llvm-svn: 222065
* [c++1z] Support [[deprecated]] attributes on namespaces. Note that it only ↵Aaron Ballman2014-11-143-7/+32
| | | | | | applies to situations where the namespace is mentioned. Thus, use on anonymous namespaces is diagnosed. llvm-svn: 222054
* Recommit r222044 with a test fix - it does not make sense to huntAnton Korobeynikov2014-11-143-26/+80
| | | | | | for a typedef before arithmetic conversion in all rare corner cases. llvm-svn: 222049
* Removing an unused variable; NFC.Aaron Ballman2014-11-141-1/+0
| | | | llvm-svn: 222048
* Again revert r222044 to resolve darwin objc test fails.Anton Korobeynikov2014-11-143-80/+26
| | | | llvm-svn: 222047
* Follow-up to D6217Anton Korobeynikov2014-11-143-26/+80
| | | | | | | | | | | | | | | | | Summary: Ok, here is somewhat addition to D6217 aiming to preserve old darwin behavior wrt the typedefed types. The actual change to SemaChecking turned out to be pretty gross, in particular: 1. We need to extract the typedef'ed type for proper diagnostics 2. We need to walk over paren expressions as well Reviewers: chandlerc, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6256 llvm-svn: 222044
* Add DiagID and Warning Flag to DiagnosticsLogSteven Wu2014-11-141-0/+10
| | | | llvm-svn: 222042
* Remove some redundant virtual specifiers on overriden functions.David Blaikie2014-11-147-22/+22
| | | | llvm-svn: 222024
* Typo fix.Yaron Keren2014-11-141-1/+1
| | | | llvm-svn: 222016
* clang-format: [Java] Further improve generics formatting.Daniel Jasper2014-11-141-1/+2
| | | | llvm-svn: 222011
* clang-format: Correctly detect multiplication in ctor initializer.Daniel Jasper2014-11-141-1/+1
| | | | | | | | | | Before: Constructor() : a(a), area(width *height) {} After: Constructor() : a(a), area(width * height) {} llvm-svn: 222010
* [Sema]. Warn when logical expression is a pointerFariborz Jahanian2014-11-142-0/+20
| | | | | | | which evaluates to true. rdar://18716393. Reviewed by Richard Trieu llvm-svn: 222009
* Silencing a -Wparentheses warning; NFC.Aaron Ballman2014-11-141-1/+1
| | | | llvm-svn: 221998
* Replace weird whitespace symbols with good old spacesTimur Iskhodzhanov2014-11-141-4/+4
| | | | llvm-svn: 221997
* Add one illustrative class hierarchy as an example in a comment to the ↵Timur Iskhodzhanov2014-11-141-0/+58
| | | | | | VFTableBuilder code llvm-svn: 221996
* Complete support for the SD-6 standing document (based off N4200) with ↵Aaron Ballman2014-11-142-7/+27
| | | | | | support for __has_cpp_attribute. llvm-svn: 221991
* clang-format: Improve function parameter packing.Daniel Jasper2014-11-141-1/+2
| | | | | | | | | | | | | | | Before: void SomeLoooooooooooongFunction( std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb); After: void SomeLoooooooooooongFunction( std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb); llvm-svn: 221989
* [PowerPC] Enable vec_perm for long long and double vector types for VSXBill Schmidt2014-11-141-0/+67
| | | | | | | | | | VSX makes the "vector long long" and "vector double" types available. This patch enables the vec_perm interface for these types. The same builtin is generated regardless of the specified type, so no additional work or testing is needed in the back end. Tests are added to ensure this builtin is generated by the front end. llvm-svn: 221988
* clang-format: Support assignments as conditional operands.Daniel Jasper2014-11-141-3/+5
| | | | | | | | | | | | | | | | | | | | | Before: return a != b // comment ? a : a = a != b // comment ? a = b : a; After: return a != b // comment ? a : a = a != b // comment ? a = b : a; llvm-svn: 221987
* clang-format: Improve indentation of comments in expressions.Daniel Jasper2014-11-142-3/+6
| | | | | | | | | | | | | | | | | | | | | Before: int i = (a) // comment + b; return aaaa == bbbb // comment ? aaaa : bbbb; After: int i = (a) // comment + b; return aaaa == bbbb // comment ? aaaa : bbbb; llvm-svn: 221985
* [PowerPC] Add VSX builtins for vec_divBill Schmidt2014-11-141-0/+15
| | | | | | | | | | | | This patch adds builtin support for xvdivdp and xvdivsp, along with a new test case. The builtins are accessed using vec_div in altivec.h. Builtins are listed (mostly) alphabetically there, so inserting these changed the line numbers for deprecation warnings tested in test/Headers/altivec-intrin.c. There is a companion patch for LLVM. llvm-svn: 221984
* clang-format: [Java] Fix line break behavior of class declarations.Daniel Jasper2014-11-141-6/+13
| | | | | | | | | Change breaking preferences: 1. Break before "extends" 2. Break before "implements" 3. Break within the implements list. llvm-svn: 221981
* clang-format: [Java] Improve generic return type formatting.Daniel Jasper2014-11-141-1/+2
| | | | | | | | | | Before: public<R> ArrayList<R> get() { After: public <R> ArrayList<R> get() { llvm-svn: 221979
* clang-format: [Java] No altnerative operator names in Java.Daniel Jasper2014-11-141-2/+3
| | | | | | | | | | Before: someObject.and (); After: someObject.and(); llvm-svn: 221978
* clang-format: [Java] Improve formatting of generics.Daniel Jasper2014-11-142-8/+7
| | | | | | | | | | Before: Function < F, ? extends T > function; After: Function<F, ? extends T> function; llvm-svn: 221976
* [OPENMP] Temporary fix for processing of global variables in loops.Alexey Bataev2014-11-141-1/+12
| | | | | | Currently there is a bug in processing of global variables used as loop control variables in 'omp for/simd' constructs: these globals must be captured as private variables, but currently they are nor. This is a temporary bug fix for this problem until the correct solution is prepared. If a global var used as lcv without explicit mark as a private/linear/lastprivate the error message is emitted. llvm-svn: 221970
* [Sanitizer] Refactor SanitizerArgs parsing in Driver.Alexey Samsonov2014-11-142-118/+217
| | | | | | | | | | | Remove flag parsing details from the public header. Use SanitizerSet to represent the set of enabled sanitizers. Cleanup the implementation: update the comments to reflect reality, remove dead code. No functionality change. llvm-svn: 221968
* Remove -fseh-exceptions in favor of checking the tripleReid Kleckner2014-11-145-26/+37
| | | | | | | | | This option was misleading because it looked like it enabled the language feature of SEH (__try / __except), when this option was really controlling which EH personality function to use. Mingw only supports SEH and SjLj EH on x86_64, so we can simply do away with this flag. llvm-svn: 221963
* Cleanup SanitizerArgs: get rid of unused variable, make one method ↵Alexey Samsonov2014-11-141-7/+2
| | | | | | non-static. NFC. llvm-svn: 221959
* PR21565 Add an egregious hack to support broken libstdc++ headers that declareRichard Smith2014-11-142-1/+29
| | | | | | | | | | | | a member named 'swap' and then expect unqualified lookup for the name 'swap' in its exception specification to find anything else. Without delay-parsed exception specifications, this was ill-formed (NDR) by [basic.scope.class]p1, rule 2. With delay-parsed exception specifications, the call to 'swap' unambiguously finds the function being declared, which then fails because the arguments don't work for that function. llvm-svn: 221955
* [Profile] Always build profile runtime library with -fPIC.Alexey Samsonov2014-11-141-9/+3
| | | | | | | | | This change removes libclang_rt.profile-pic-<arch>.a version of profile runtime. Instead, it's sufficient to always build libclang_rt.profile-<arch>.a with -fPIC, as it can be linked into both executables and shared objects. llvm-svn: 221952
* -Wsentinel: Suggest nullptr in C++11 instead of NULLReid Kleckner2014-11-131-2/+4
| | | | llvm-svn: 221945
* Fix assert/crash on invalid with __builtin_constant_p conditionals in ↵Richard Smith2014-11-131-1/+5
| | | | | | constant expressions. llvm-svn: 221942
* Objective-C. Fixes a regression caused by implementationFariborz Jahanian2014-11-132-4/+16
| | | | | | | | of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued. llvm-svn: 221933
* PR21437, final part of DR1330: delay-parsing of exception-specifications. ThisRichard Smith2014-11-1313-50/+313
| | | | | | | is a re-commit of Doug's r154844 (modernized and updated to fit into current Clang). llvm-svn: 221918
* Hook up FreeBSD AArch64 supportEd Maste2014-11-131-0/+4
| | | | | | Patch from Andrew Turner. llvm-svn: 221900
* clang-format: Format extern "C" blocks like namespace blocks.Nico Weber2014-11-131-2/+11
| | | | | | | | | | | | | | | | | | | | | namespace blocks act as if KeepEmptyLinesAtTheStartOfBlocks is always true, and aren't collapsed to a single line even if they would fit. Do the same for extern "C" blocks. Before, extern "C" { void ExternCFunction(); } was collapsed into `extern "C" { void ExternCFunction(); }`. Now it stays like it was. Fixes http://crbug.com/432640 and part of PR21419. llvm-svn: 221897
* clang-format: [Java] Support Java enums.Daniel Jasper2014-11-132-18/+86
| | | | | | | In Java, enums can contain a class body and enum constants can have arguments as well as class bodies. Support most of that. llvm-svn: 221895
* Support non-owned DiagnosticConsumer in SetupSerializedDiagnosticsAlexander Kornienko2014-11-131-4/+8
| | | | | | | | | | This fixes an assertion when running clang-tidy on a file having --serialize-diagnostics in compiler options. Committing a regression test for clang-tidy separately. Patch by Aaron Wishnick! llvm-svn: 221884
* PR19372: Keep checking template arguments after we see an argument packRichard Smith2014-11-121-28/+11
| | | | | | | | expansion into a parameter pack; we know that we're still filling in that parameter's arguments. Previously, if we hit this case for an alias template, we'd try to substitute using non-canonical template arguments. llvm-svn: 221832
* Temporary revert r221818 until all the problemsAnton Korobeynikov2014-11-122-13/+5
| | | | | | with objc stuff will be resolved. llvm-svn: 221829
* [Objective-C++ IRGen] do not generate .cxx_construct Fariborz Jahanian2014-11-121-1/+15
| | | | | | | for class that contains trivially-constructible struct ivar. rdar://18950072 llvm-svn: 221823
* Fix fallout from r219557Anton Korobeynikov2014-11-122-5/+13
| | | | | | | | | | | | | | | | | Summary: Consider the following nifty 1 liner: (0 ? csqrtl(2.0f) : sqrtl(2.0f)). One can easily obtain such code from e.g. tgmath. Right now it produces an assertion because we fail to do the promotion real => _Complex real. The case was properly handled previously (old handleOtherComplexFloatConversion routine), but was forgotten in the current version. This seems to be about fallout from r219557 Reviewers: chandlerc, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6217 llvm-svn: 221821
* Fix brace init of unions with unnamed struct membersReid Kleckner2014-11-121-2/+3
| | | | | | | | The check for unnamed members was intended to skip unnamed bitfields, but it ended up skipping unnamed structs. This lead to an assertion in IRGen. llvm-svn: 221818
* Update Clang's SD-6 support to match N4200 (except for __has_cpp_attribute,Richard Smith2014-11-121-0/+16
| | | | | | which we don't yet implement). llvm-svn: 221816
OpenPOWER on IntegriCloud