summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [OPENMP] Updated comments and _OPENMP macro value for OpenMP 4.0 (for 'omp ↵Alexey Bataev2014-03-063-5/+10
| | | | | | simd' support) llvm-svn: 203114
* [-Wunreachable-code] Refine treating all branches of 'switch' as reachable, ↵Ted Kremenek2014-03-061-18/+4
| | | | | | which includes those with all cases covered but with no 'default:'. llvm-svn: 203094
* [-Wunreachable-code] don't warn about dead 'return <string literal>' ↵Ted Kremenek2014-03-061-2/+52
| | | | | | | | | | | | | dominated by a 'noreturn' call, where literal becomes an std::string. I have mixed feelings about this one. It's used all over the codebase, and is analogous to the current heuristic for ordinary C string literals. This requires some ad hoc pattern matching of the AST. While the test case mirrors what we see std::string in libc++, it's not really testing the libc++ headers. llvm-svn: 203091
* [OPENMP] Clause 'num_threads'Alexey Bataev2014-03-068-0/+132
| | | | llvm-svn: 203087
* PGO: add instrumentation for Objective-C methods.Bob Wilson2014-03-062-2/+30
| | | | llvm-svn: 203085
* [OPENMP] Added option -fopenmp=libiomp5|libgompAlexey Bataev2014-03-062-8/+54
| | | | llvm-svn: 203081
* Remove 'break' dominated by 'return' in 'EmitBuiltinExpr'.Ted Kremenek2014-03-061-1/+0
| | | | llvm-svn: 203080
* Remove 2 dead 'break' statements. The 'break' usage in this switch is ↵Ted Kremenek2014-03-061-2/+0
| | | | | | inconsistent, making this hard to see. llvm-svn: 203079
* Remove dead return in Parser::MayBeDesignationStart().Ted Kremenek2014-03-061-2/+0
| | | | llvm-svn: 203078
* Remove dead return in BugReporter (found via -Wunreachable-code).Ted Kremenek2014-03-061-4/+2
| | | | llvm-svn: 203077
* PGO: Use the main file name to help distinguish functions with local linkage.Bob Wilson2014-03-063-23/+56
| | | | | | | | | | | | In addition, for all functions, use the name from the llvm::Function to identify the function in the profile data. Compute that "function name", including the file name for local functions, once when assigning the PGO counters and store it in the CodeGenPGO class. Move the code to add InlineHint and Cold attributes out of StartFunction(), because the "function name" string isn't available at that point. llvm-svn: 203075
* PGO: Rename variables to avoid referring to the "MangledName" of a function.Bob Wilson2014-03-062-19/+18
| | | | | | | | | | | | For C++ functions, we will continue to use the mangled name to identify functions in the PGO profile data, but this name is confusing for things like Objective-C methods. For functions with local linkage, we're also going to include the file name to help distinguish those functions, so this changes to use more generic variable names. No functional changes. llvm-svn: 203074
* Refactor PGO code in preparation for handling non-C/C++ code.Bob Wilson2014-03-063-12/+11
| | | | | | | | | | | Move the PGO.assignRegionCounters() call out of StartFunction, because that function is called from many places where it does not make sense to do PGO instrumentation (e.g., compiler-generated helper functions). Change several functions to take a StringRef argument for the unique name associated with a function, so that the name can be set differently for things like Objective-C methods and block literals. llvm-svn: 203073
* PGO: don't emit counter increment if no counters have been allocated.Bob Wilson2014-03-061-1/+1
| | | | | | | | I hit this while debugging another issue where my sources were in an inconsistent state, so I don't have a testcase. Regardless, this check is simpler and more direct than checking if the option is enabled. llvm-svn: 203072
* [Layering] Update include of Linker.h to match its move to a LinkerChandler Carruth2014-03-061-1/+1
| | | | | | subdirectory in LLVM r203065. llvm-svn: 203067
* Fix crash if a submodule overrides one of its own macros, and add support forRichard Smith2014-03-062-3/+14
| | | | | | | | submodule macro overriding within the same top-level module (necessary for the testcase to be remotely reasonable). Incidentally reduces the number of libc++ testsuite regressions with modules enabled from 7 to 6. llvm-svn: 203063
* Suppress diagnostics during name lookup for absolute value type.Richard Trieu2014-03-061-0/+1
| | | | llvm-svn: 203061
* Use private linkage for remaining GlobalVariables with private names.Rafael Espindola2014-03-061-11/+11
| | | | | | | | | | | | | | | | | | | | | | This patch changes the remaining GlobalVariables using "\01L" and "\01l" prefixes to use private linkage. What is strange about them is that they currently use WeakAnyLinkage. There is no comment stating why and that is really odd since the symbols are completely hidden, so it doesn't make sense for them to be weak. Clang revisions like r63329, r63408, r63770, r65761 set the linkage to weak, but don't say why. I suspect they were just copying llvm-gcc. In llvm-gcc I found r58599 and r56322 that set DECL_WEAK, but they were just syncing from the apple gcc. I am not exactly sure what that means, since the last commit to svn://gcc.gnu.org/svn/gcc/branches/apple was in 2006, 2 years earlier. In summary, I have no idea why weak linkage was being used :-( To quote John McCall, "Let’s try without it and see" :-) llvm-svn: 203059
* Construct GlobalValues with the correct linkage instead of using setLinkage.Rafael Espindola2014-03-061-8/+7
| | | | llvm-svn: 203052
* [-Wunreachable-code] Handle idiomatic do...while() with an uninteresting ↵Ted Kremenek2014-03-061-7/+4
| | | | | | | | | | condition. Sometimes do..while() is used to create a scope that can be left early. In such cases, the unreachable 'while()' test is not usually interesting unless it actually does something that is observable. llvm-svn: 203051
* Change the color of comment nodes from bright yellow to blue. Bright yellow onRichard Trieu2014-03-061-1/+12
| | | | | | | a white background is difficult to read. Also include a chart showing which colors are used by which elements in the AST dump. llvm-svn: 203050
* [Layering] Update include of DebugInfo.h which moved to the IR libraryChandler Carruth2014-03-061-1/+1
| | | | | | in LLVM r203046. llvm-svn: 203047
* Objective-C properties. Fixes a crash in Sema where RHS ofFariborz Jahanian2014-03-061-4/+7
| | | | | | | the property assignment is an lvalue for an incomplete type. // rdar://15118128. Reviewed offline by John McCall. llvm-svn: 203043
* Switch to an idiomatic C++ erase/remove for this loop, and fix a bug in theRichard Smith2014-03-061-3/+5
| | | | | | | process (I don't believe it's possible to write a testcase for the bug with a non-checking STL implementation). llvm-svn: 203042
* [Layering] Update include for the move of DIBuilder.h to the IR libraryChandler Carruth2014-03-061-1/+1
| | | | | | in LLVM r203038. llvm-svn: 203039
OpenPOWER on IntegriCloud