summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [-Wunreachable-code] Treat constant globals as configuration values in ↵Ted Kremenek2014-03-071-2/+14
| | | | | | | | | unreachable code heuristics. This one could possibly be refined even further; e.g. looking at the initializer and see if it is truly a configuration value. llvm-svn: 203283
* Zap another dead 'break' statement.Ted Kremenek2014-03-071-1/+0
| | | | llvm-svn: 203282
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-0797-302/+288
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with ↵Aaron Ballman2014-03-0716-158/+106
| | | | | | iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203278
* Replace OwningPtr::isValid() with conversion to bool.Ahmed Charles2014-03-071-1/+1
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203277
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-0729-77/+71
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Remove dead return and simplify code.Ted Kremenek2014-03-071-3/+1
| | | | llvm-svn: 203266
* Renaming the chains() ranged iterator to chain() per suggestion by Richard ↵Aaron Ballman2014-03-079-11/+11
| | | | | | Smith. llvm-svn: 203262
* [C++11] Replacing IndirectFieldDecl iterators chain_begin() and chain_end() ↵Aaron Ballman2014-03-079-42/+23
| | | | | | with iterator_range chains(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203261
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-0714-78/+44
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* [C++11] Replacing BlockDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-075-22/+14
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203250
* [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-0712-61/+34
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203248
* [C++11] Replace LLVM-style type traits with C++11 standard ones.Benjamin Kramer2014-03-073-7/+4
| | | | | | No functionality change. llvm-svn: 203241
* [C++11] Replacing iterators ddiag_begin() and ddiag_end() with ↵Aaron Ballman2014-03-071-4/+1
| | | | | | iterator_range ddiags(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203240
* [C++11] Updating getUsingDirectives to use iterator_range instead of a ↵Aaron Ballman2014-03-072-10/+7
| | | | | | std::pair. llvm-svn: 203239
* Fully reverting r203236 -- it seems the only bots that are happy are the ↵Aaron Ballman2014-03-078-44/+60
| | | | | | MSVC bots. llvm-svn: 203237
* [C++11] Replacing iterators attr_begin() and attr_end() with iterator_range ↵Aaron Ballman2014-03-078-60/+44
| | | | | | attrs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203236
* [OPENMP] Fix for threadprivate construct instantiatiation.Alexey Bataev2014-03-071-0/+3
| | | | llvm-svn: 203225
* Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual ↵Timur Iskhodzhanov2014-03-071-91/+37
| | | | | | inheritance hierarchy llvm-svn: 203222
* [OPENMP] Small update in threadprivate variables processing to fix template ↵Alexey Bataev2014-03-071-2/+2
| | | | | | instantiation. llvm-svn: 203214
* [Preprocessor] Pass TranslationUnitKind to the preprocessor and if it is ↵Argyrios Kyrtzidis2014-03-075-10/+19
| | | | | | | | | | TU_Prefix avoid warning for unused macros. rdar://15034698 llvm-svn: 203213
* [OPENMP] Fixed linked libraries for libiomp5 on LinuxAlexey Bataev2014-03-071-1/+1
| | | | llvm-svn: 203212
* Add a bunch of missing changes from r203208Ben Langmuir2014-03-071-106/+123
| | | | | | Somehow lost these in a git operation. llvm-svn: 203210
* Fix recent regressions in -Wreturn-type caused by heuristics to ↵Ted Kremenek2014-03-071-248/+274
| | | | | | | | | | | | | | | | | -Wunreachable-code. I had forgotten that the same reachability code is used by both -Wreturn-type and -Wunreachable-code, so the heuristics applied to the latter were indirectly impacting the former. To address this, the reachability code is more refactored so that whiled the logic at its core is shared, the intention of the clients are better captured and segregated in helper APIs. Fixes PR19074, and also some false positives reported offline to me by Nick Lewycky. llvm-svn: 203209
* Add dependencies from imported modules with -MDBen Langmuir2014-03-075-66/+161
| | | | | | | | Add module dependencies to the dependency files created by -MD/-MMD/etc. by attaching an ASTReaderListener that will call into the dependency file generator when a module input file is seen in the serialized AST. llvm-svn: 203208
* Another one fix for getSema()/getDerived().getSema()Alexey Bataev2014-03-071-1/+1
| | | | llvm-svn: 203196
* Fixed getSema()/getDerived().getSema() diff pointed by Hal Finkel.Alexey Bataev2014-03-071-1/+1
| | | | llvm-svn: 203195
* [-Wunreachable-code] Correctly expand artificial reachability to pruned '&&' ↵Ted Kremenek2014-03-072-10/+18
| | | | | | and '||' branches involving configuration values. llvm-svn: 203194
* [-Wunreachable-code] Teach reachable code analysis heuristics about more ↵Ted Kremenek2014-03-071-0/+2
| | | | | | literal types. llvm-svn: 203193
* The Visual Studio IDE changed behavior in VS2012. It used to be the case thatYunzhong Gao2014-03-071-1/+3
| | | | | | | | | | | | | | | | the clang diagnostic has to report a column number one less than the correct value in order for the IDE to move the cursor to the expected location. This behavior is changed in VS2012 and VS2013 so that the IDE is now expecting the column number to match the actual source location. Before: source(line, column-1): type: message After: source(line, column): type: message This patch changes -fdiagnostics-format=msvc to match the new VS2012 and VS2013 when fmsc-version is 1700 or greater. Differential Revision: http://llvm-reviews.chandlerc.com/D2949 llvm-svn: 203183
* [C++11] Replacing iterators redecls_begin() and redecls_end() with ↵Aaron Ballman2014-03-0616-125/+74
| | | | | | iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely. llvm-svn: 203179
* C. Compare vector sizes using their raw element size instead ofFariborz Jahanian2014-03-061-42/+45
| | | | | | | | getTypeSize (which rounds up sizes) in order to issue diagnostics when casting to mismatched vector sizes; instead of crashing in IRGen. // rdar:// 16196902. Reviewed offline by John McCall. llvm-svn: 203175
* Use llvm.compiler.used instead of llvm.used for objc symbols.Rafael Espindola2014-03-064-39/+52
| | | | | | | | | | | | | LLVM currently has a hack (shouldEmitUsedDirectiveFor) that causes it to not print no_dead_strip for symbols starting with 'l' or 'L'. These are exactly the ones that the clang's objc codegen is producing. The net result, is that it is equivalent to llvm.compiler.used. The need for putting the private symbol in llvm.compiler.used should be clear (the objc runtime uses them). The reason for also putting the weak symbols in it is for LTO: ld64 will not ask us to preserve the it. llvm-svn: 203172
* Remove a dead store, add a FIXME for another.Richard Smith2014-03-061-0/+1
| | | | llvm-svn: 203169
* Exclude invalid old decl from mismatching linkage assertionIsmail Pazarbasi2014-03-061-3/+2
| | | | | | | | This patch fixes PR18964. In linkage computation, assertion fails when an old invalid declaration's linkage mismatches with the current decl's one. llvm-svn: 203168
* Remove dead code I introduced 6 years, 4 months ago in r43518.Ted Kremenek2014-03-061-25/+0
| | | | | | Found by -Wunreachable-code. llvm-svn: 203167
* Update for LLVM API changeSaleem Abdulrasool2014-03-064-9/+10
| | | | | | | Use the new getObjectFormat/setObjectFormat instead of Environment now that the file format is a separate field. llvm-svn: 203161
* PGO: Add support for Objective-C blocks.Bob Wilson2014-03-062-1/+22
| | | | llvm-svn: 203157
* Fix dead store and simplify. No functionality change (although the code is nowRichard Smith2014-03-061-36/+31
| | | | | | correct if MaxEditDistance were increased to something greater than 1). llvm-svn: 203153
* MS ABI: Disambiguate the manglings for global guard variablesDavid Majnemer2014-03-061-5/+9
| | | | | | | | | If a guard variable will be created for an entity at global scope, then we cannot rely on the scope depth to disambiguate names for us. Instead, mangle the entire variable into the guard to ensure it's uniqueness. llvm-svn: 203151
* Based on usage, the NamedDecl is always set when constructing a ↵Aaron Ballman2014-03-061-6/+3
| | | | | | | | CallingContext, but none of the other optional parameters are. Removing the optional parameters, and making the NamedDecl required. No functional changes intended. llvm-svn: 203149
* Refactored to use a simple helper function that wraps the logic of creating ↵Aaron Ballman2014-03-061-26/+18
| | | | | | | | an SExprNode and returning the position in which it was inserted. No functional change intended. llvm-svn: 203148
* MS ABI: Fix the initializer/finalizer mangling for static data membersDavid Majnemer2014-03-061-0/+4
| | | | | | | Initializers and finalizers for static data members have the variable's access-specifier, storage-class, type and CV-qualifiers mangled in. llvm-svn: 203145
* Very minor simplification and typo correction; no functional changes intended.Aaron Ballman2014-03-061-14/+3
| | | | llvm-svn: 203144
* Revert "Use private linkage for remaining GlobalVariables with private names."Rafael Espindola2014-03-061-11/+11
| | | | | | | | This reverts commit r203059. Revert while we discuss what does it mean to be private and weak. llvm-svn: 203141
* Fix use-after-free detected by ASan bootstrap.Richard Smith2014-03-061-2/+7
| | | | llvm-svn: 203140
* [ASTPrinter] 'SEL' isn't a ObjCObjectPointer, so we don't need to handle it ↵Argyrios Kyrtzidis2014-03-061-4/+3
| | | | | | | | in TypePrinter::printObjCObjectPointerBefore. Suggested by Jordan. llvm-svn: 203124
* Fix operator<< recognition (PR19064).Alexander Kornienko2014-03-061-2/+4
| | | | llvm-svn: 203123
* Reformatting the style used within the massive attribute semantic handling ↵Aaron Ballman2014-03-061-115/+245
| | | | | | | | switch statement, so now there is only one style used in this block of code, instead of three or more styles. No functional change intended. llvm-svn: 203120
* Added an inserter for ArrayRef<SourceRange>.Alexander Kornienko2014-03-061-12/+4
| | | | | | | | | | | | | | Summary: Added an inserter for ArrayRef<SourceRange>, as it is already needed in at least two places (static analyzer and clang-tidy). Reviewers: jordan_rose CC: cfe-commits, gribozavr Differential Revision: http://llvm-reviews.chandlerc.com/D2984 llvm-svn: 203117
OpenPOWER on IntegriCloud