summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Correction to -mfu=neon-vfpv4 to pass the correct backend feature nameRichard Barton2014-12-182-4/+4
| | | | | Change-Id: I4dbfe1d97670fc4e626368ef1f91fc008778dfca llvm-svn: 224523
* Enabling this test again on mingw. The problem seems to happen whenYaron Keren2014-12-181-1/+0
| | | | | | | two identical module.modulemap are available on the include path and so should be fixed in the mingw driver include dies, when we'll have it. llvm-svn: 224515
* clang-format: Fix incorrect detection of ObjC "in" keyword.Daniel Jasper2014-12-182-1/+3
| | | | | | | | | | Before: for (auto v : in [1]) { .. After: for (auto v : in[1]) { .. llvm-svn: 224513
* Fixed warnings on redefine keywords and reserved ids.Serge Pavlov2014-12-188-36/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | Repared support for warnings -Wkeyword-macro and -Wreserved-id-macro. The warning -Wkeyword-macro now is not issued in patterns that are used in configuration scripts: #define inline also for 'const', 'extern' and 'static'. If macro repalcement is identical to macro name, the warning also is not issued: #define volatile volatile And finally if macro replacement is also a keyword identical to the replaced one but decorated with leading/trailing underscores: #define inline __inline #define inline __inline__ #define inline _inline // in MSVC compatibility mode Warning -Wreserved-id-macro is off by default, it could help catching things like: #undef __cplusplus llvm-svn: 224512
* Parse: Don't parse after the eof has been consumedDavid Majnemer2014-12-183-1/+22
| | | | | | | | | | | | | | ParseCXXNonStaticMemberInitializer stashes away all the tokens for the initializer and an additional EOF token to denote where the initializer ends. However, it is possible for ParseLexedMemberInitializer to get its hands on the "real" EOF token; since the two tokens are indistinguishable, we end up consuming the EOF and descend into madness. Instead, make it possible to tell which EOF token we are looking at. This fixes PR21872. llvm-svn: 224505
* Fix for PR21915: assert on multidimensional VLA in function arguments.Alexey Bataev2014-12-183-22/+59
| | | | | | | Fixed assertion on type checking for arguments and parameters on function call if arguments are pointers to VLA Differential Revision: http://reviews.llvm.org/D6655 llvm-svn: 224504
* Change -save-temps to emit unoptimized bitcode files.Bob Wilson2014-12-1814-62/+140
| | | | | | | | | | | | | | | | | | | 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: 224503
* Update for llvm front end change and use the TargetOptions structEric Christopher2014-12-182-5/+1
| | | | | | for ABI. llvm-svn: 224493
* Make sure that arm-linux-gnu is still the apcs-gnu ABI when weEric Christopher2014-12-183-13/+16
| | | | | | | | | | | | use clang -cc1 matching the front end and backend. Fix up a couple of tests that were testing aapcs for arm-linux-gnu. The test that removes the aapcs abi calling convention removes them because the default triple matches what the backend uses for the calling convention there and so it doesn't need to be explicitly stated - see the code in TargetInfo.cpp. llvm-svn: 224491
* Reinstate aapcs as the default arm abi.Eric Christopher2014-12-182-8/+9
| | | | llvm-svn: 224490
* CGDebugInfo: Use DIBuilder API for self-referencing DICompositeTypesDuncan P. N. Exon Smith2014-12-182-9/+25
| | | | | | | | | | | Use new `DIBuilder` API from LLVM r224482 to mutate `DICompositeType`s, rather than changing them directly. This allows `DIBuilder` to track otherwise orphaned cycles when `CollectContainingType()` creates a self-reference. Fixes PR21941. llvm-svn: 224483
* Fix diagnostic for static methods referencing fields from using declsReid Kleckner2014-12-182-2/+12
| | | | | | | | | | | | Previously we thought the instance member was a function, not a field, and we'd say something silly like: t.cpp:4:27: error: call to non-static member function without an object argument static int f() { return n; } ^ Noticed in PR21923. llvm-svn: 224480
* [Objective-C]. Modern property getters have side-effects.Fariborz Jahanian2014-12-184-2/+20
| | | | | | | | So, place warning about property getter should not be used for side-effect under its own group so warning can be turned off. rdar://19137815 llvm-svn: 224479
* Fix a function that only calls itself. The const_cast needs to remove theRichard Trieu2014-12-181-1/+1
| | | | | | const so that the other overloaded function will be called. llvm-svn: 224478
* InstrProf: Simplify/reduce state in CoverageMapping (NFC)Justin Bogner2014-12-171-38/+2
| | | | | | | | This state object makes things harder to reason about and isn't really useful, since we can just emit the mappings before the state changes rather than holding on to it. llvm-svn: 224476
* Revert "Put static local variables of inline functions in the function comdat."Rafael Espindola2014-12-172-7/+8
| | | | | | | | | This reverts commit r224369. Thanks to Reid Kleckner for pointing out that we need a bigger gun to fix this case. llvm-svn: 224475
* Don't assume friended C++ method decls have qualifiersReid Kleckner2014-12-172-3/+56
| | | | | | | | | | | There are a few cases where unqualified lookup can find C++ methods. Unfortunately, none of them seem to have illegal access paths, so I can't excercise the diagnostic source range code that I am changing here. Fixes PR21851, which was a crash on valid. llvm-svn: 224471
* Adding a -Wunused-value warning for expressions with side effects used in an ↵Aaron Ballman2014-12-1723-47/+191
| | | | | | unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case. llvm-svn: 224465
* [sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, clang partKostya Serebryany2014-12-172-2/+3
| | | | llvm-svn: 224462
* [c++1z] Fixes for generalized non-type template argument support: check forRichard Smith2014-12-172-42/+83
| | | | | | | | exact type match for deduced template arguments, and be sure to produce correct canonical TemplateArgument representations to enable correct redeclaration matching. llvm-svn: 224456
* Destroy the diagnostic client first in ~DiagnosticEngineReid Kleckner2014-12-173-0/+13
| | | | | | | | | | | | Add a comment and a test to ~DiagnosticEngine about the ordering requirements on the teardown of DiagnosticConsumer. This could also be accomplished by rearranging the fields of ~DiagnosticEngine, but I felt that this was a better, more explicit solution. This fixes PR21911, an issue that occurred after the unique_ptr migration in r222193. llvm-svn: 224454
* This test does not pass for -target i686-pc-windows-gnu (-mingw32)Yaron Keren2014-12-171-0/+1
| | | | | | | when clang is built with mingw-w64 4.9.1 or according to http://llvm.org/PR20995 , mingw-w64 4.7.2 as well. llvm-svn: 224453
* Don't build invalid AST nodes during recoveryReid Kleckner2014-12-172-2/+13
| | | | | | | | | | | | | | A DependentScopeDeclRefExpr should always have a nested name specifier. During template instantiation, if we found that the named context was incomplete, we would previously build a DependentScopeDeclRefExpr with an empty qualifier. This error recovery path has been asserting for some time. The other error codepaths use ExprError, so we can do the same. Fixes PR21864. llvm-svn: 224451
* Support constant evaluation for member calls on std::initializer_listRichard Smith2014-12-172-0/+6
| | | | | | temporaries. llvm-svn: 224449
* Revert "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-1717-101/+195
| | | | | | | | | Fails an ASan bootstrap - I'll try to reproduce locally & sort that out before recommitting. This reverts commit r224385. llvm-svn: 224441
* Basic: clean up bleeding whitespaceSaleem Abdulrasool2014-12-171-2/+2
| | | | | | Whitespace cleanup. NFC. llvm-svn: 224439
* CodeGen: implement __emit intrinsicSaleem Abdulrasool2014-12-174-0/+49
| | | | | | | | | | | | | | | For MSVC compatibility, add the `__emit' builtin. This is used in the Windows SDK headers, and must therefore be implemented as a builtin rather than an intrinsic. The `__emit' builtin provides a mechanism to emit a 16-bit opcode instruction into the stream. The value must be a compile time constant expression. No guarantees are made about the CPU and memory states after the execution of the instruction. Due to the unchecked nature of the builtin, only support this on Windows on ARM. llvm-svn: 224438
* Revert r224433, r224371 is good enough for now.Joerg Sonnenberger2014-12-171-2/+1
| | | | llvm-svn: 224435
* Rangify for loop, NFC.Yaron Keren2014-12-171-4/+2
| | | | llvm-svn: 224434
* Disable the keyword-as-macro warning for now until the noise level isJoerg Sonnenberger2014-12-171-1/+2
| | | | | | reduced. llvm-svn: 224433
OpenPOWER on IntegriCloud