summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Mark __builtin_ia32_cmppd256 and __builtin_ia32_cmpps256 as taking an ICE ↵Craig Topper2014-12-271-2/+2
| | | | | | for the constant parameter. llvm-svn: 224874
* Add more test coverage for the Objective-C deprected selector warning.Nico Weber2014-12-271-0/+11
| | | | | | | I broke this case in a local patch I'm writing, and there was no test to stop me. Now there is. llvm-svn: 224873
* Adjust the rest of the tests due to r224849.David Majnemer2014-12-261-2/+2
| | | | llvm-svn: 224865
* Update tests due to r224849David Majnemer2014-12-262-2/+2
| | | | | | Inferring nuw caused some clang tests to change their output. llvm-svn: 224851
* Sema: Qualify getPrintable's Expr argumentDavid Majnemer2014-12-261-1/+1
| | | | | | | | getPrintable has an overload which takes a bool. This means that const qualified Exprs would get forwarded to the bool overload instead of the Expr overload. llvm-svn: 224844
* WIPDavid Majnemer2014-12-261-16/+16
| | | | llvm-svn: 224843
* Initialize BackendConsumer::Context in constructor.Yaron Keren2014-12-251-1/+1
| | | | llvm-svn: 224836
* Initialize CodeGeneratorImpl::Ctx in constructor.Yaron Keren2014-12-251-1/+1
| | | | llvm-svn: 224835
* [analyzer] Updated progress for memory.ZeroAllocAnton Yartsev2014-12-241-1/+2
| | | | llvm-svn: 224797
* [analyzer] +memory.ZeroAllocAnton Yartsev2014-12-241-1/+26
| | | | llvm-svn: 224796
* clang-cl: Various changes to /Zc: handling.Nico Weber2014-12-233-6/+67
| | | | | | | | | | | | | | | * /Zc:trigraphs and /Zc:trigraphs- are now honored * /Zc:strictStrings is now honored * /Zc:auto is now honored/ignored (clang does the Right Thing for this already) Also add a dedicated test for the various /Zc: flags. clang-cl doesn't always agree with cl.exe on the default values for /Zc flags. For example, I think clang always behaves as if /Zc:inline is passed, and warns if the user explicitly passes /Zc:inline- Fixes PR21974. llvm-svn: 224791
* Add driver flags -ftrigraphs, -fno-trigraphs.Nico Weber2014-12-2313-25/+42
| | | | | | | | | | | | | | | | | -trigraphs is now an alias for -ftrigraphs. -fno-trigraphs makes it possible to explicitly disable trigraphs, which couldn't be done before. clang -std=c++11 -fno-trigraphs now builds without GNU extensions, but with trigraphs disabled. Previously, trigraphs were only disabled in GNU modes or with -std=c++1z. Make the new -f flags the cc1 interface too. This requires changing -trigraphs to -ftrigraphs in a few cc1 tests. Related to PR21974. llvm-svn: 224790
* Remove unused test input.Nico Weber2014-12-231-5/+0
| | | | llvm-svn: 224784
* Debug Info: Pass the pointer size into createMemberPointerType().Adrian Prantl2014-12-232-3/+4
| | | | | | Paired commit with LLVM. llvm-svn: 224781
* This reverts commit r224668 and r224667.Rafael Espindola2014-12-233-35/+21
| | | | | | | | | | r224667 broke bootstrap on Fedora 20 X86_64 (at least). See pr22006 for the details. r224668 depends on r224667. llvm-svn: 224770
* Add a triple to try and get this test passing on the ARM bots.Nico Weber2014-12-231-1/+1
| | | | llvm-svn: 224747
* Disable trigraphs in microsoft mode by default. Matches cl.exe.Nico Weber2014-12-222-11/+13
| | | | | | | | | | The default value of Opts.Trigraphs now no longer depends solely on the language input kind, so move the code out of setLangDefaults(). Also make sure that Opts.MSVCCompat is set before the Trigraph code runs. Related to PR21974. llvm-svn: 224719
* Rename test.cc files to test.cpp.Nico Weber2014-12-226-3/+3
| | | | | | | The lit.cfg files only add .cpp to suffixes, so these tests used to never run, oops. (Also tweak to of these tests in minor ways to make the actually pass.) llvm-svn: 224718
* Add test coverage for cc1's trigraph option handling.Nico Weber2014-12-221-0/+15
| | | | llvm-svn: 224714
* Simplify test for rdar://19256338Fariborz Jahanian2014-12-221-12/+4
| | | | | | (from patch r224549). llvm-svn: 224713
* MS ABI: Make the string mangling code more conciseDavid Majnemer2014-12-221-36/+10
| | | | | | No functional change intended. llvm-svn: 224696
* Wrap to 80 columns. NfC.Nico Weber2014-12-221-10/+11
| | | | llvm-svn: 224695
* Reapply "Change -save-temps to emit unoptimized bitcode files."Bob Wilson2014-12-2117-63/+166
| | | | | | | | | | | | | | | | | | | | | | | | This reapplies r224503 along with a fix for compiling Fortran by having the clang driver invoke gcc (see r224546, where it was reverted). I have added a testcase for that as well. Original commit message: It is often convenient to use -save-temps to collect the intermediate results of a compilation, e.g., when triaging a bug report. Besides the temporary files for preprocessed source and assembly code, this adds the unoptimized bitcode files as well. This adds a new BackendJobAction, which is mostly mechanical, to run after the CompileJobAction. When not using -save-temps, the BackendJobAction is combined into one job with the CompileJobAction, similar to the way the integrated assembler is handled. I've implemented this entirely as a driver change, so under the hood, it is just using -disable-llvm-optzns to get the unoptimized bitcode. Based in part on a patch by Steven Wu. rdar://problem/18909437 llvm-svn: 224688
* Frontend: Fix typo in comments.Logan Chien2014-12-201-2/+2
| | | | llvm-svn: 224680
* Fix a bunch of integer template argument problems in template type diffing.Richard Trieu2014-12-201-20/+10
| | | | | | | | | | | | | Reverts most of the changes from r168005. Since template arguments have proper conversions now, no extending of integers is needed. Further, since the integers are the correct size now, use APSInt::operator== instead of APSInt::hasSameValue since operator== will check the size and signness match. Prior to one comparison of APSInt's, check that both are valid. Previous, one could be uninitialized. Also changed APInt to APSInt in GetInt. This occassionally produced a sign flip, which will now be caught by operator==. llvm-svn: 224668
* Fix for PR21758Richard Trieu2014-12-203-1/+25
| | | | | | | | | When a non-type template argument expression needs a conversion to change it into the argument type, preserve that information by remaking the TemplateArgument with an expression that has those conversions. Also a small fix to template type diffing to handle the extra conversions in some cases. llvm-svn: 224667
* Removing an outdated FIXME; try block attributes are parsed with the rest of ↵Aaron Ballman2014-12-201-1/+0
| | | | | | the statement attributes (as per the standard), and function-try-blocks may not have attributes. NFC. llvm-svn: 224662
* Driver: hoist an assertionSaleem Abdulrasool2014-12-191-10/+4
| | | | | | | Remove an unnecessary conditional, hoisting the assertion. Minor style tweaks/reflowing. NFC. llvm-svn: 224654
* Driver: refactor a local variableSaleem Abdulrasool2014-12-191-10/+10
| | | | | | | Pull out a getToolChain() into a local variable to share the call across to all the uses. NFC. llvm-svn: 224653
* Don't drop attributes when checking explicit specializations.Nico Weber2014-12-193-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider a template class with attributes on a method, and an explicit specialization of that method: template <int> struct A { void foo() final; }; template <> void A<0>::foo() {} In this example, the attribute is `final`, but it might also be an __attribute__((visibility("foo"))), noreturn, inline, etc. clang's current behavior is to strip all attributes, which for some attributes is wrong (the snippet above allows a subclass of A<0> to override the final method, for example) and for others disagrees with gcc. So stop dropping attributes. r95845 added this code without a test case, and r176728 added the code for dropping attributes on parameters (with tests, but they still pass). As an additional wrinkle, do drop dllimport and dllexport, since that's how these two attributes work. (This is covered by existing tests.) Fixes PR21942. The approach is by Richard Smith, initial analysis and typing was done by me. With this, clang also matches GCC and EDG on all attributes Richard tested. llvm-svn: 224651
* Tweak the assert in ModuleBuilder from r224533 (PR21989)Hans Wennborg2014-12-192-2/+12
| | | | | | | Turns out there will be left-over deferred inline methods if there have been errors, because in that case HandleTopLevelDecl bails out early. llvm-svn: 224649
* DR1048: drop top-level cv-qualifiers when deducing the return type of aRichard Smith2014-12-196-12/+34
| | | | | | lambda-expression in C++11, to match the C++14 rules. llvm-svn: 224620
* Allow to disable all sanitizers with "-fno-sanitize=all" option.Alexey Samsonov2014-12-193-5/+24
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds "all" sanitizer group. A shortcut "-fno-sanitize=all" can be used to disable all sanitizers for a given source file. "-fsanitize=all" option makes no sense, and will produce an error. This group can also be useful when we add "-fsanitize-recover=<list>" options (patch in http://reviews.llvm.org/D6302), as it would allow to conveniently enable/disable recovery for all specified sanitizers. Test Plan: regression test suite Reviewers: kcc, rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6733 llvm-svn: 224596
* Added a fixit to remove empty parens from a C++11 attribute argument list ↵Aaron Ballman2014-12-192-2/+7
| | | | | | when we diagnose this as an error. llvm-svn: 224595
* Fix an address space id reset with array decay'sPekka Jaaskelainen2014-12-192-1/+13
| | | | | | | | | | implicit conversion. The issue was produced with OpenCL C code that called a function with a constant string literal argument. llvm-svn: 224592
* Use ObjCMultipleMethodNames to match the option.Fariborz Jahanian2014-12-192-2/+2
| | | | llvm-svn: 224585
* Attributes accepting an EnumArgument are allowed to pass a string literal, ↵Aaron Ballman2014-12-193-2/+10
| | | | | | | | or an identifier. VariadicEnumArguments now behave consistently instead of only accepting a string literal. This change affects the only attribute accepting a variadic enumeration: callable_when. llvm-svn: 224582
* Putting unevaluated expression warnings, and evaluated typeid warnings, ↵Aaron Ballman2014-12-192-3/+7
| | | | | | under their own warning flags. Amends r224465. llvm-svn: 224578
* [Sanitizer] Get rid of parseArgument helper function. NFC.Alexey Samsonov2014-12-191-54/+43
| | | | llvm-svn: 224564
* Fix layering violation, Lex shouldn't know about DeclDavid Majnemer2014-12-192-7/+6
| | | | llvm-svn: 224562
* PR21969: Improve diagnostics for a conversion function that has any pieces of aRichard Smith2014-12-198-14/+136
| | | | | | declared return type (including a trailing-return-type in C++14). llvm-svn: 224561
* Correct delayed typos in the operand to typeof expressions.Kaelyn Takata2014-12-192-2/+7
| | | | | | Fixes PR21947. llvm-svn: 224558
* Fix a typo.Adrian Prantl2014-12-191-1/+1
| | | | llvm-svn: 224557
* [c Sema]. Patch fixes pointer-bool-conversion warning on C codeFariborz Jahanian2014-12-182-3/+17
| | | | | | | | when source range is incorrect causing the warning to be issued when it should not because expression is in a macro. rdar://19256338 llvm-svn: 224549
* Revert "Change -save-temps to emit unoptimized bitcode files."Reid Kleckner2014-12-1814-140/+62
| | | | | | | | | | This reverts commit r224503. It broke compilation of fortran through the Clang driver. Previously `clang -c t.f` would invoke `gcc t.f` and `clang -cc1as`, but now it tries to call `clang -cc1 t.f` which fails for obvious reasons. llvm-svn: 224546
* [CMake] Add check-asan-dynamic command to external compiler-rt setup.Alexey Samsonov2014-12-181-2/+2
| | | | llvm-svn: 224545
* Objective-C. Provide group name for warningFariborz Jahanian2014-12-184-3/+30
| | | | | | | on multiple selector names found during lookup. rdar://19265296 llvm-svn: 224536
* ModuleBuilder: assert that all deferred inline method defs get handledHans Wennborg2014-12-181-4/+7
| | | | | | | While we're here, also move the declaration of DeferredInlineMethodDefinitions closer to the other member vars and make it a SmallVector. NFC. llvm-svn: 224533
* Revert "Don't build invalid AST nodes during recovery"Reid Kleckner2014-12-182-13/+2
| | | | | | | | | | | This reverts commit r224451. It caused us to reject some valid existing code. This code appears to run in non-error cases as well as error cases. If the scope of a DependentScopeDeclRefExpr is still incomplete it probably means we still have more instantiation to do. llvm-svn: 224526
* [Objective-C]. Patch to unify code generation for ObjCMsgSend and ObjCBoxedExpr.Fariborz Jahanian2014-12-182-6/+11
| | | | | | Patch by Alex Denisov. NFC. llvm-svn: 224525
OpenPOWER on IntegriCloud