summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] Remove check covered by -Wobjc-missing-super-calls.Jordan Rose2014-08-221-39/+0
| | | | | | | | | The ObjCDealloc checker is currently disabled because it was too aggressive, but this is a good first step in getting it back to a useful state. Patch by David Kilzer! llvm-svn: 216272
* Objective-C. Warn if user has made explicit callFariborz Jahanian2014-08-228-0/+47
| | | | | | | to +initilize as this results in an extra call to this method. rdar://16628028 llvm-svn: 216271
* -fms-extensions: Alias _intNN to __intNNReid Kleckner2014-08-222-0/+9
| | | | | | | | | | Fixes build for SPEC 2000 CPU. MSVC disables these aliases under /Za, which enables stricter standards compliance. We don't currently have any way to disable them. Patch by Kevin Smith! llvm-svn: 216270
* Fixing MSVC warning: "warning C4373: 'blah': virtual function overrides ↵Aaron Ballman2014-08-221-4/+2
| | | | | | | | 'blah', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers." This warning is basically useless because the "previous versions" being referred to is MSVC 2005 and earlier, and we obviously do not care about them. However, this warning isn't particularly chatty (I don't recall ever seeing it previously), and it has the opportunity to point out cases where the cv-qualifiers differ unintentionally (like this case), so I am leaving it enabled for now. llvm-svn: 216267
* [AArch64, inline-asm] Improve diagnostic that is printed when the size of aAkira Hatanaka2014-08-229-28/+128
| | | | | | | | | | | | | | | | | variable that has regiser constraint "r" is not 64-bit. General register operands are output using 64-bit "x" register names, regardless of the size of the variable, unless the asm operand is prefixed with the "%w" modifier. This surprises and confuses many users who aren't familiar with aarch64 inline assembly rules. With this commit, a note and fixit hint are printed which tell the users that they need modifier "%w" in order to output a "w" register instead of an "x" register. <rdar://problem/12764785> llvm-svn: 216260
* MS ABI: Don't use the Itanium scheme for numbering lambdasDavid Majnemer2014-08-226-56/+85
| | | | | | | | | | | The Itanium ABI will give out the same mangling number for two different lambdas if their call operators have different types. The MS ABI cannot do the same because it does not mangle the return type into it's lambdas. This fixes PR20719. llvm-svn: 216259
* Fix PR20705, crash on invalid.Richard Trieu2014-08-222-1/+22
| | | | | | dyn_cast -> dyn_cast_or_null to handle a null pointer. llvm-svn: 216254
* CGCall: Factor out the logic mapping call arguments to LLVM IR arguments.Alexey Samsonov2014-08-222-235/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This refactoring introduces ClangToLLVMArgMapping class, which encapsulates the information about the order in which function arguments listed in CGFunctionInfo should be passed to actual LLVM IR function, such as: 1) positions of sret, if there is any 2) position of inalloca argument, if there is any 3) position of helper padding argument for each call argument 4) positions of regular argument (there can be many if it's expanded). Simplify several related methods (ConstructAttributeList, EmitFunctionProlog and EmitCall): now they don't have to maintain iterators over the list of LLVM IR function arguments, dealing with all the sret/inalloca/this complexities, and just use expected positions of LLVM IR arguments stored in ClangToLLVMArgMapping. This may increase the running time of EmitFunctionProlog, as we have to traverse expandable arguments twice, but in further refactoring we will be able to speed up EmitCall by passing already calculated CallArgsToIRArgsMapping to ConstructAttributeList, thus avoiding traversing expandable argument there. No functionality change. Test Plan: regression test suite Reviewers: majnemer, rnk Reviewed By: rnk Subscribers: cfe-commits, rjmccall, timurrrr Differential Revision: http://reviews.llvm.org/D4938 llvm-svn: 216251
* [test/CodeGen/ARM] Adpat test to match new codegen after r216236.Quentin Colombet2014-08-221-9/+9
| | | | llvm-svn: 216249
* Update for LLVM API change to remove discriminator tracking from ↵David Blaikie2014-08-211-2/+1
| | | | | | DILexicalBlock (in favor of DILexicalBlockFile - where a default arg is used to avoid the need for API churn of those callers) llvm-svn: 216240
* Update Clang for LLVM API change to use unique_ptr in ↵David Blaikie2014-08-212-4/+4
| | | | | | SourceManager::AddNewSourceBuffer llvm-svn: 216226
* Return statements are initialization; don't forget to revert the initializer toRichard Smith2014-08-212-1/+11
| | | | | | its syntactic form before re-analyzing it during template instantiation. llvm-svn: 216224
* Simplify this logic now that -W can't be applied to remarks. No ↵Richard Smith2014-08-211-8/+1
| | | | | | functionality change. llvm-svn: 216222
* Fix grammatical error in diagnostic.Richard Smith2014-08-213-4/+4
| | | | llvm-svn: 216221
* Pass expressions instead of argument ranges to EmitCall/EmitCXXConstructorCall.Alexey Samsonov2014-08-216-64/+41
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a first small step towards passing generic "Expr" instead of ArgBeg/ArgEnd pair into EmitCallArgs() family of methods. Having "Expr" will allow us to get the corresponding FunctionDecl and its ParmVarDecls, thus allowing us to alter CodeGen depending on the function/parameter attributes. No functionality change. Test Plan: regression test suite Reviewers: rnk Reviewed By: rnk Subscribers: aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D4915 llvm-svn: 216214
* Coverage Mapping: store function's hash in coverage function records.Alex Lorenz2014-08-214-6/+9
| | | | | | | | | | The profile data format was recently updated and the new indexing api requires the code coverage tool to know the function's hash as well as the function's name to get the execution counts for a function. Differential Revision: http://reviews.llvm.org/D4995 llvm-svn: 216208
* Refactor TLI creation. NFC.Rafael Espindola2014-08-211-7/+10
| | | | llvm-svn: 216198
* Objective-C. Recover from missing interface decl.Fariborz Jahanian2014-08-212-1/+29
| | | | | | | and checking on availability of method declaration instead of crashing. // rdar://18059669 llvm-svn: 216191
* Range'ify some for loops over RecordDecl::fields()Hans Wennborg2014-08-214-18/+16
| | | | | | No functionality change. llvm-svn: 216183
* R600: Implement getPointerWidthV()Tom Stellard2014-08-212-0/+35
| | | | | | | This fixes a crash in the OCL_ImgProc/Canny OpenCV test. NOTE: This is a candidate for the 3.5 branch. llvm-svn: 216181
* R600: Add processor type for hainanTom Stellard2014-08-211-0/+1
| | | | llvm-svn: 216180
* Driver: Implement -cl-denorms-are-zeroTom Stellard2014-08-212-0/+7
| | | | | | This is currently a no-op, which is allowed by the OpenCL specification. llvm-svn: 216179
* [analyzer] Don't warn on virtual calls in ctors to final methods.Benjamin Kramer2014-08-212-4/+32
| | | | | | | The call will never go to a more derived class, but that's intentional in those cases. llvm-svn: 216167
* Fix invalid test generation by utils/ABITest/ABITestGen.py when the same ↵Daniel Sanders2014-08-212-2/+6
| | | | | | | | | | | | | | | | | | | | | | | enum is generated more than once. When generating records/unions, the same enum type may be generated more than once (with different names). In these cases, the name of the enum values are not sufficiently unique to prevent multiple declarations. E.g: typedef enum T3 { enum0val0 } T3; typedef T3 T2[3]; typedef enum T4 { enum0val0 } T4; typedef union T1 { T2 field0; T4 field1; char field2; } T1; Added a unique suffix to enum values so that multiple identical enum types do not use the same enum value names. One example of this bug is produced by: ABITestGen.py --no-unsigned --no-vector --no-complex --no-bool \ --max-args 0 --max-record-depth 1 -o inputs/test.9921.a.c \ -T inputs/test.9921.b.c -D inputs/test.9921.driver.c \ --min=9921 --count=1 llvm-svn: 216166
* MS ABI: Don't always instantiate all members of dllexported class templates ↵Hans Wennborg2014-08-213-5/+57
| | | | | | | | | | | | | | | | (PR20163) Normally we mark all members of exported classes referenced to get them emitted. However, MSVC doesn't do this for class templates that are implicitly specialized or just have an explicit instantiation declaration. For such specializations, the members are emitted when referenced. The exception is the case when the dllexport attribute is propagated from a base class to a base class template that doesn't have an explicit attribute: in this case all methods of the base class template do get instantiated. llvm-svn: 216145
* test/CodeGenCXX/dllexport.cpp: don't instantiate templates in USEMEMFUNC macroHans Wennborg2014-08-211-11/+11
| | | | | | | Use the derived class in the macro instead, to make it unambigous where the template is being instantiated. llvm-svn: 216142
* [test] Turn off warnings for test/Analysis/identical-expressions.cpp.Jordan Rose2014-08-201-3/+3
| | | | | | | Also, make it slightly clearer what's being tested by only differentiating integer literals based on their suffix, rather than using a very large constant. llvm-svn: 216133
* Test: CoverageMapping: use "RUN: FileCheck" command instead of "RUN: cat | ↵Alex Lorenz2014-08-203-9/+9
| | | | | | | | | | Filecheck". Change the lit RUN commands for 3 tests to use the following pattern "FileCheck -input-file ..." instead of "cat ... | FileCheck ..." as suggested by Justin Bogner. llvm-svn: 216085
* Coverage mapping: fix mapping for objective-c for statementAlex Lorenz2014-08-202-0/+19
| | | | llvm-svn: 216082
* Coverage mapping: fix mapping for objective-c message expressionAlex Lorenz2014-08-202-0/+21
| | | | llvm-svn: 216081
* [analyzer] UnixAPI: Check that the third argument to open(2) (if present) is ↵Jordan Rose2014-08-202-0/+57
| | | | | | | | an integer. Patch by Daniel Fahlgren. llvm-svn: 216079
* [analyzer] UnixAPI: Check when open(2) is called with more than three arguments.Jordan Rose2014-08-202-21/+63
| | | | | | Patch by Daniel Fahlgren. llvm-svn: 216078
* [analyzer] IdenticalExpr: don't try to compare integer literals with ↵Jordan Rose2014-08-202-1/+18
| | | | | | | | different widths. PR20659. Patch by Anders Rönnholm. llvm-svn: 216076
* [analyzer] IdenticalExpr: use getBytes rather than getString to compare ↵Jordan Rose2014-08-202-1/+8
| | | | | | | | string literals. PR20693. Patch by Anders Rönnholm. llvm-svn: 216075
* Objective-C [qoi]. Provide fix-it hint when sendingFariborz Jahanian2014-08-194-5/+46
| | | | | | class method to an object receiver. rdar://16263395 llvm-svn: 216038
* Handle SPARC float command line parameters for SPARCv9.Brad Smith2014-08-192-1/+6
| | | | llvm-svn: 216029
* Test: Coverage Mapping: add missing RUN commandsAlex Lorenz2014-08-192-10/+10
| | | | | | | Add the llvm-lit RUN commands for the two coverage mapping tests that filecheck a temporary file. llvm-svn: 216020
* Add tests for coverage mapping generation.Alex Lorenz2014-08-1926-0/+712
| | | | | | | | | | This patch adds the tests for the coverage mapping generation. Most of the tests check the mapping regions produced by the generator, and one checks the llvm IR. Differential Revision: http://reviews.llvm.org/D4847 llvm-svn: 215995
* ext_vector IRGen. Patch to allow indexing into Fariborz Jahanian2014-08-193-3/+51
| | | | | | | ext_vector_type's 'hi/lo' components when used as lvalue. rdar://18031917 pr20697 llvm-svn: 215991
* C++1y is now C++14!Aaron Ballman2014-08-1946-209/+218
| | | | | | Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording. llvm-svn: 215982
* Move the body out of line to try to fix a buildbot.Rafael Espindola2014-08-192-1/+5
| | | | llvm-svn: 215980
* Go back to having a takeModule instead of a getModule.Rafael Espindola2014-08-192-2/+2
| | | | | | | Returning a std::unique_ptr is more constrained. Thanks to David Blaikie for the suggestion. llvm-svn: 215979
* [OPENMP] Extract common superclass from all the loop directives. No ↵Alexander Musman2014-08-198-71/+109
| | | | | | functional changes (having common superclass is convenient for future loop directives CodeGen implementation) llvm-svn: 215975
* MS ABI: Update alias template mangling for VC "14" CTP 3David Majnemer2014-08-192-4/+3
| | | | | | | | MSVC "14" CTP 3 has fixed it's mangling for alias templates when used as template-template arguments; update clang to be compatible with this mangling. llvm-svn: 215972
* Update for llvm api change.Rafael Espindola2014-08-193-18/+18
| | | | llvm-svn: 215968
* Add a warning flag for an existing diagnostic.Nico Weber2014-08-182-3/+3
| | | | | | | One more, and the number of flags without a dedicated flag fits in two decimal digits :-) llvm-svn: 215946
* Update link strategy for sanitizer runtime libraries on Linux:Alexey Samsonov2014-08-182-33/+47
| | | | | | | | | | | | | | | | | | | 1. Always put static sanitizer runtimes to the front of the linker invocation line. This was already done for all sanitizers except UBSan: in case user provides static libstdc++ we need to make sure that new/delete operator definitions are picked from sanitizer runtimes instead of libstdc++. We have to put UBSan runtime first for similar reasons: it depends on some libstdc++ parts (e.g. __dynamic_cast function), and has to go first in link line to ensure these functions will be picked up from libstdc++. 2. Put sanitizer libraries system dependencies (-ldl, -lpthread etc.) right after sanitizer runtimes. This will ensure these libraries participate in the link even if user provided -Wl,-as-needed flag. This should fix PR15823. 3. In case we link in several sanitizer runtimes (e.g. "ubsan", "ubsan_cxx" and "san"), add system dependencies (-ldl, -lpthread, ...) only once. llvm-svn: 215940
* Fix the rececl chain for redeclarations of predefined declsBen Langmuir2014-08-183-0/+14
| | | | | | | | | Predefined decls like 'Protocol' in objc are not loaded from AST files, so we cannot rely on loading the canonical decl to complete the redecl chain for redeclarations of these decls. The broken redecl chain was non-circular, so looping over redecls() would hang. llvm-svn: 215929
* Store std::unique_ptr in InMemoryBuffers. NFC.Rafael Espindola2014-08-184-28/+35
| | | | llvm-svn: 215928
* return a std::unique_ptr from getMainBufferWithPrecompiledPreamble. NFC.Rafael Espindola2014-08-182-24/+26
| | | | llvm-svn: 215927
OpenPOWER on IntegriCloud