summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Push nested-name-specifier source-location information intoDouglas Gregor2011-02-255-49/+36
| | | | | | | | pseudo-destructor expressions. Also, clean up some template-instantiation and type-checking issues with pseudo-destructors. llvm-svn: 126498
* Teach objc-rewriter to pass -fobjc-exceptions along.Fariborz Jahanian2011-02-251-1/+4
| | | | llvm-svn: 126497
* Push nested-name-specifier source location information into namespaceDouglas Gregor2011-02-255-14/+10
| | | | | | aliases. llvm-svn: 126496
* Make sure to give CXXScopeSpec::SetInvalid() a valid sourceDouglas Gregor2011-02-251-1/+3
| | | | | | range. Fixes four new failures in the GCC testsuite. llvm-svn: 126495
* Push nested-name-specifier source location information into using directives.Douglas Gregor2011-02-257-18/+22
| | | | llvm-svn: 126489
* Switch a few CXXScopeSpec::MakeTrivial() calls over to appropriateDouglas Gregor2011-02-252-7/+9
| | | | | | NestedNameSpecifierLoc handling. llvm-svn: 126486
* Maintain nested-name-specifier source-location information throughDouglas Gregor2011-02-251-23/+17
| | | | | | instantiation of using declarations (all three forms). llvm-svn: 126485
* Rough fix for PR9323 that prevents Clang from marking copy constructorChandler Carruth2011-02-252-3/+12
| | | | | | | | | | | | | | | | declarations as referenced when in fact we're not going to even form a call in the AST. This is significant because we attempt to allow as an extension classes with intentionally private and undefined copy constructors to have temporaries bound to references, and so shouldn't warn about the lack of definition for that copy constructor when the class is internal. Doug, John wasn't really satisfied with the presence of overloading at all. This is a stop-gap and there may be a better solution. If you can give me some hints for how you'd prefer to see this solved, I'll happily switch things over. llvm-svn: 126480
* Add support for ArchLinux, patch by Kevin Winchester.Chandler Carruth2011-02-251-2/+10
| | | | llvm-svn: 126476
* Formatting, etc.John McCall2011-02-251-17/+17
| | | | llvm-svn: 126475
* Tame an assert; the scope depth of a jump destination does notJohn McCall2011-02-251-1/+1
| | | | | | | | necessarily enclose the innermost normal cleanup depth, because the top of the jump scope stack might be an EH cleanup or EH scope. Fixes PR9303. llvm-svn: 126472
* Use NestedNameSpecifierLoc within out-of-line variables, function, andDouglas Gregor2011-02-2511-116/+264
| | | | | | | tag definitions. Also, add support for template instantiation of NestedNameSpecifierLocs. llvm-svn: 126470
* Teach TextDiagnosticPrinter to print out '-Werror' in addition to the ↵Ted Kremenek2011-02-252-4/+21
| | | | | | | | | | warning flag for a warning mapped to an error. For example: t.c:7:9: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses] llvm-svn: 126466
* Update UsingDecl, UnresolvedUsingTypenameDecl, andDouglas Gregor2011-02-2512-75/+237
| | | | | | | | | | | | | | UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the extremely-lossy NestedNameSpecifier/SourceRange pair it used to use, improving source-location information. Various infrastructure updates to support NestedNameSpecifierLoc: - AST/PCH (de-)serialization - Recursive AST visitor - libclang traversal (including the first tests of this functionality) llvm-svn: 126459
* Intoduce '-analyzer-checker-help' flag which outputs a list of all available ↵Argyrios Kyrtzidis2011-02-254-2/+71
| | | | | | | | static analyzer checkers. This is pretty basic for now, eventually checkers should be grouped according to package, hidden checkers should be indicated etc. llvm-svn: 126454
* Fix the rest of PR9316 along with some other bugs spotted by inspection.Chandler Carruth2011-02-251-11/+12
| | | | | | | | | | | I tried to add test cases for these, but I can't because variables aren't warned on the way functions are and the codegen layer appears to use different logic for determining that 'a' and 'g' in the test case should receive C mangling. I've included the test so that if we ever switch the codegen layer to use these functions, we won't regress due to latent bugs. llvm-svn: 126453
* Don't warn about using PredefinedExprs as format string literals. These ↵Ted Kremenek2011-02-241-1/+7
| | | | | | | | never can be a real security issue. Fixes PR 9314. llvm-svn: 126447
* [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't ↵Argyrios Kyrtzidis2011-02-243-13/+0
| | | | | | have any checkers associated with it anymore. llvm-svn: 126440
* [analyzer] Allow a checker to be hidden even if its package is hidden & enabled.Argyrios Kyrtzidis2011-02-242-4/+6
| | | | | | | For example, if 'core.experimental.UnreachableCode' is hidden, it should not be enabled with 'core.experimental'. Note that this requires llvm commit r126436. llvm-svn: 126439
* [analyzer] Migrate CastSizeChecker to CheckerV2.Argyrios Kyrtzidis2011-02-244-20/+18
| | | | llvm-svn: 126438
* Fix a rewrite bug. // rdar://9039342Fariborz Jahanian2011-02-241-1/+9
| | | | llvm-svn: 126435
* Use private linkage to avoid symbol conflicts in corner cases like the oneRafael Espindola2011-02-241-1/+1
| | | | | | in PR9301. llvm-svn: 126422
* Likely fix for PR9316 and other unknown bugs: don't use the anonynmousChandler Carruth2011-02-241-2/+6
| | | | | | | namespace blanket rule for variables and functions declared 'extern "C"'. llvm-svn: 126400
* Retain complete source-location information for C++Douglas Gregor2011-02-2413-35/+354
| | | | | | | | | | | | nested-name-specifiers throughout the parser, and provide a new class (NestedNameSpecifierLoc) that contains a nested-name-specifier along with its type-source information. Right now, this information is completely useless, because we don't actually store the source-location information anywhere in the AST. Call this Step 1/N. llvm-svn: 126391
* From Vassil Vassilev:Axel Naumann2011-02-241-1/+6
| | | | | | Add an interface for last resort, unqualified lookup. It can provide results for unqualified lookup when Sema fails to find anything itself. llvm-svn: 126387
* Revert "Use CharUnits values for Size and DataSize outside of the bitfieldDaniel Dunbar2011-02-241-19/+23
| | | | | | layout", it broke some GCC tests. llvm-svn: 126386
* Allow passing a list of comma separated checker names to -analyzer-checker, e.g:Argyrios Kyrtzidis2011-02-241-2/+7
| | | | | | -analyzer-checker=cocoa,unix llvm-svn: 126372
* [analyzer] Migrate ArrayBoundChecker to CheckerV2.Argyrios Kyrtzidis2011-02-244-18/+21
| | | | llvm-svn: 126371
* [analyzer] Don't pass a GRState to CheckerManager::runCheckersForLocation, ↵Argyrios Kyrtzidis2011-02-242-14/+16
| | | | | | | | terrible mistake. If the state is new, make sure an ExplodedNode is associated with it. llvm-svn: 126370
* [analyzer] Migrate ReturnPointerRangeChecker to CheckerV2.Argyrios Kyrtzidis2011-02-244-23/+20
| | | | llvm-svn: 126369
* compute the integer width, not the memory width here. We want to know thatChris Lattner2011-02-241-2/+1
| | | | | | | _Bool is 1 bit, not 8. This fixes an assertion on the testcase, which is PR9304 and rdar://9045501. llvm-svn: 126368
* Reimplement DefineTypeSize in terms of APInt. This eliminates someChris Lattner2011-02-241-9/+4
| | | | | | | magic integer arithmetic and allows it to work with types larger than 64 bits. llvm-svn: 126365
* rework processing of unavailable and deprecated attributes to avoid Chris Lattner2011-02-241-25/+19
| | | | | | | unneeded allocation of an empty StringLiteral when these don't have a message. llvm-svn: 126364
* Fix tiny error in CFG construction for BinaryConditionalOperators, making ↵Ted Kremenek2011-02-242-12/+19
| | | | | | | | | sure the branch always has two successors. Also teach Environment::getSVal() about OpaqueValueExprs. This fixes a crash reported in PR9287, and also fixes a false positive involving the value of such ternary expressions not properly getting propagated. llvm-svn: 126362
* Teach NestedNameSpecifier to keep track of namespace aliases the sameDouglas Gregor2011-02-2411-10/+143
| | | | | | | | way it keeps track of namespaces. Previously, we would map from the namespace alias to its underlying namespace when building a nested-name-specifier, losing source information in the process. llvm-svn: 126358
* Use CharUnits values for Size and DataSize outside of the bitfield layoutKen Dyck2011-02-241-23/+19
| | | | | | | methods, when they are known to be exact multiples of the width of the char type. llvm-svn: 126357
* Use Context.getCharWidth() in place of literal '8's in assertions.Ken Dyck2011-02-241-2/+2
| | | | llvm-svn: 126356
* Make the Size and DataSize members more CharUnits-friendly by wrapping themKen Dyck2011-02-241-35/+58
| | | | | | | | | | | with getter and setter methods in both bit units and CharUnits. This will help simplify some of the unit mismatch in the parts of the code where sizes are known to be exact multiples of the width of the char type. Assertions in the getters help guard against accidentally converting to CharUnits when sizes are not exact multiples of the char width. llvm-svn: 126354
* [analyzer] Remove unused functions from CheckerManager.Argyrios Kyrtzidis2011-02-242-7/+0
| | | | llvm-svn: 126352
* [analyzer] Migrate StreamChecker to CheckerV2.Argyrios Kyrtzidis2011-02-241-75/+71
| | | | llvm-svn: 126351
* [analyzer] Migrate CStringChecker to CheckerV2.Argyrios Kyrtzidis2011-02-243-100/+193
| | | | llvm-svn: 126350
* Tweak the CXXScopeSpec API a bit, so that we require theDouglas Gregor2011-02-248-56/+32
| | | | | | nested-name-specifier and source range to be set at the same time. llvm-svn: 126347
* Teach CXXScopeSpec to handle the extension of a nested-name-specifierDouglas Gregor2011-02-245-114/+207
| | | | | | | | | with another component in the nested-name-specifiers, updating its representation (a NestedNameSpecifier) and source-location information (currently a SourceRange) simultaneously. This is groundwork for adding source-location information to nested-name-specifiers. llvm-svn: 126346
* Handle value dependent LHS as well as RHS. Test both of these, theyChandler Carruth2011-02-241-1/+1
| | | | | | | | don't seem to have been covered by our tests previously. This should fix bootstrap failure. llvm-svn: 126345
* Implement a warning for known shift overflows on constant shiftChandler Carruth2011-02-231-16/+56
| | | | | | | | | | | | | | | | | | | | | | | expressions. Consider the code: int64_t i = 10 << 30; This compiles fine, but most developers expect it to produce the value for 10 gigs, not -2 gigs. This is actually undefined behavior because the LHS is a signed integer type. The warning is currently gated behind -Wshift-overflow. There is a special case where only the sign bit is overridden that gets a custom error message and is by default ignored. This case is much less likely to cause observed buggy behavior, it's just undefined behavior according to the spec. This warning can be enabled with -Wshift-sign-overflow. Original patch by Oleg Slezberg, with style tweaks and some correctness fixes by me. llvm-svn: 126342
* Fix bogus -Warray-bounds warning involving 'array[true]' reported in PR 9296.Ted Kremenek2011-02-231-1/+1
| | | | llvm-svn: 126341
* Preserve what the user passed to -include when emitting .d files. Fixes PR8974!Nick Lewycky2011-02-233-14/+22
| | | | llvm-svn: 126334
* [analyzer] Migrate StackAddrLeakChecker to CheckerV2.Argyrios Kyrtzidis2011-02-233-30/+40
| | | | llvm-svn: 126333
* [analyzer] Refactor EndOfFunctionNodeBuilder.Argyrios Kyrtzidis2011-02-235-7/+9
| | | | | | | | | -Introduce EndOfFunctionNodeBuilder::withCheckerTag to allow it be "specialized" with a checker tag and not require the checkers to pass a tag. -For EndOfFunctionNodeBuilder::generateNode, reverse the order of tag/P parameters since there are actual calls that assume the second parameter is ExplodedNode. llvm-svn: 126332
* [analyzer] Migrate IdempotentOperationChecker to CheckerV2.Argyrios Kyrtzidis2011-02-231-34/+24
| | | | llvm-svn: 126331
OpenPOWER on IntegriCloud