summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Call the correct base class in StmtProfiler::VisitUnresolvedLookupExpr.Argyrios Kyrtzidis2010-08-151-4/+8
| | | | llvm-svn: 111089
* Some refactoring on StmtPrinter to avoid unused function warnings.Argyrios Kyrtzidis2010-08-151-15/+9
| | | | llvm-svn: 111088
* Add ATTRIBUTE_UNUSED to methods not supposed to be used.Argyrios Kyrtzidis2010-08-152-4/+6
| | | | llvm-svn: 111087
* Commit improved version of 111026 & 111027.Argyrios Kyrtzidis2010-08-155-31/+127
| | | | | | | | | | | | | | | | | | | | Unused warnings for functions: -static functions -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace Unused warnings for variables: -static variables -variables in anonymous namespace -static data members in anonymous namespace -static data members specializations in anonymous namespace Reveals lots of opportunities for dead code removal in llvm codebase that will interest my esteemed colleagues. llvm-svn: 111086
* Explicitly handle every case in the switch in RTTIBuilder::BuildTypeInfo.Eli Friedman2010-08-151-2/+15
| | | | llvm-svn: 111085
* Remember that FixItOptions* is optional and don't crash when it's not provided.Nick Lewycky2010-08-141-1/+1
| | | | llvm-svn: 111084
* Update CStringChecker to take advantage of the new metadata symbols and ↵Jordy Rose2010-08-141-87/+245
| | | | | | region change callback. Now does basic tracking of string length for general regions. Currently this is still only used for modeling strlen(). llvm-svn: 111081
* PR7884: Fix the implementations of __real__ and __imag__ on real floats.Eli Friedman2010-08-141-9/+21
| | | | llvm-svn: 111080
* Add a callback for when region changes occur. Still somewhat of a ↵Jordy Rose2010-08-144-17/+105
| | | | | | work-in-progress, but working! Effect on clients: all changes to a store now go through GRState. llvm-svn: 111078
* Another metadata symbol change (missed a file)Jordy Rose2010-08-141-0/+13
| | | | llvm-svn: 111077
* Add a new metadata symbol type for checkers to use. Metadata symbols must be ↵Jordy Rose2010-08-142-16/+92
| | | | | | associated with a region and will be collected if the region dies or its checker fails to mark it as in use. llvm-svn: 111076
* More cleanup enabling.John McCall2010-08-143-12/+52
| | | | llvm-svn: 111070
* PR3344: Downgrade "too many braces around scalar initializer" to a warning.Eli Friedman2010-08-141-7/+7
| | | | llvm-svn: 111067
* Implement caching of code-completion results for macro definitionsDouglas Gregor2010-08-134-84/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the CXTranslationUnit_CacheCompletionResults option is given to clang_parseTranslationUnit(). Essentially, we compute code-completion results for macro definitions after we have parsed the file, then store an ASTContext-agnostic version of those results (completion string, cursor kind, priority, and active contexts) in the ASTUnit. When performing code completion in that ASTUnit, we splice the macro definition results into the results provided by the actual code-completion (which has had macros turned off) before libclang gets those results. We use completion context information to only splice in those results that make sense for that context. With a completion involving all of the macros from Cocoa.h and a few other system libraries (totally ~8500 macro definitions) living in a precompiled header, we get about a 9% performance improvement from code completion, since we no longer have to deserialize all of the macro definitions from the precompiled header. Note that macro definitions are merely the canary; the cache is designed to also support other top-level declarations, which should be a bigger performance win. That optimization will be next. Note also that there is no mechanism for determining when to throw away the cache and recompute its contents. llvm-svn: 111051
* Sketch out a framework for delaying the activation of a cleanup.John McCall2010-08-134-7/+119
| | | | | | Not yet complete or used. llvm-svn: 111044
* Revert 111026 & 111027, build breakage.Argyrios Kyrtzidis2010-08-133-106/+28
| | | | llvm-svn: 111036
* The unused warnings extravaganza continues. Warn for:Argyrios Kyrtzidis2010-08-133-13/+51
| | | | | | | | | -static variables -variables in anonymous namespace (fixes rdar://7794535) -static data members in anonymous namespace -static data members specializations in anonymous namespace llvm-svn: 111027
* Expand the unused warnings for functions. Warn for:Argyrios Kyrtzidis2010-08-133-25/+65
| | | | | | | | | | -static function declarations -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace llvm-svn: 111026
* Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also ↵Argyrios Kyrtzidis2010-08-134-52/+65
| | | | | | | | keeping track of unused file scoped variables. This is only preparation, currently only static function definitions are tracked, as before. llvm-svn: 111025
* When issuing warning for future conflict resolution,Fariborz Jahanian2010-08-131-0/+3
| | | | | | | | (nonfragile-abi2), do not consider 'ivar' access in class methods. Also, improve on diagnostics. Radar 8304561. llvm-svn: 111023
* Add a new cc1 option -fix-what-you-can which when combined with the fix-it modeNick Lewycky2010-08-133-12/+18
| | | | | | will apply all fixes even when there were other errors in the file. llvm-svn: 111020
* Fixed NNS insertion in MemberPointerType.Abramo Bagnara2010-08-131-9/+13
| | | | llvm-svn: 111013
* Properly give unique-external linkage to members of member templatesJohn McCall2010-08-131-15/+51
| | | | | | instantiated with unique-external parameters. llvm-svn: 111012
* Work around a crash when checking access to injected class namesJohn McCall2010-08-131-2/+7
| | | | | | | | | | qua templates. The current fix suppresses the access check entirely in this case; to do better, we'd need to be able to say that a particular lookup result came from a particular injected class name, which is not easy to do with the current representation of LookupResult. This is on my known-problems list. llvm-svn: 111009
* Implement clang_saveTranslationUnit(), which saves a translation unitDouglas Gregor2010-08-131-0/+23
| | | | | | into a PCH/AST file. llvm-svn: 111006
* Driver/OptParser: Add a NoForward flag to prevent forwarding certain options toDaniel Dunbar2010-08-132-1/+3
| | | | | | | | GCC. - Mark -Xclang and -mlinker-version= with it for now, although I am sure there are more. llvm-svn: 111005
* Teach ASTUnit to hold on to the Sema object and ASTConsumer that areDouglas Gregor2010-08-134-12/+33
| | | | | | | | used when parsing (or re-parsing) a file. Also, when loading a precompiled header into ASTUnit, create a Sema object that holds onto semantic-analysis information. llvm-svn: 111003
* Perform access control when template lookup finds a class template.John McCall2010-08-131-4/+11
| | | | | | This is *really* hacky. llvm-svn: 110997
* Zap unused UnaryOperator::OffsetOf.Eli Friedman2010-08-1310-80/+1
| | | | llvm-svn: 110996
* The Sema object will get destroyed before all of the others anyway. We don't ↵Douglas Gregor2010-08-131-1/+0
| | | | | | need to force it llvm-svn: 110993
* Instead of modifying the ObjC AST to not modify existing declarations, teach ↵Sebastian Redl2010-08-135-18/+74
| | | | | | chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is. llvm-svn: 110989
* Make use of __func__ in a block actually refer toFariborz Jahanian2010-08-131-6/+17
| | | | | | block's helper function. Fixes radar 7860965. llvm-svn: 110988
* Just disable the hidden-visibility optimization for now by hiding it behindJohn McCall2010-08-124-5/+17
| | | | | | | | a -cc1 option. The Darwin linker complains about mixed visibility when linking gcc-built objects with clang-built objects, and the optimization isn't really that valuable. Platforms with less ornery linkers can feel free to enable this. llvm-svn: 110979
* Teach CompilerInstance to create and hold on to the Sema object usedDouglas Gregor2010-08-122-6/+24
| | | | | | | for parsing, so that it can persist beyond the lifetime of the parsing call. llvm-svn: 110978
* Small changes to UnreachableCodeCheckerTom Care2010-08-121-3/+20
| | | | | | | - Added detection of Empty CFGBlocks (artificial blocks) - Relaxed an assertion based on an incorrect assumption until further investigation llvm-svn: 110974
* Add a ParseAST overload that takes a Sema object, so that the callerDouglas Gregor2010-08-122-38/+49
| | | | | | | | | can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. llvm-svn: 110973
* Improved IdempotentOperationChecker false positives and false negatives.Tom Care2010-08-121-98/+203
| | | | | | | | | - Unfinished analysis may still report valid warnings if the path was completely analyzed - New 'CanVary' heuristic to recursively determine if a subexpression has a varying element - Updated test cases, including one known bug - Exposed GRCoreEngine through GRExprEngine llvm-svn: 110970
* Typo.Fariborz Jahanian2010-08-121-1/+1
| | | | llvm-svn: 110965
* Patch to issue warning when colllection expresion's typeFariborz Jahanian2010-08-121-0/+21
| | | | | | | does not implement 'countByEnumeratingWithState' API. Implements radar 7634669. llvm-svn: 110964
* Implement -Wcast-align. The initial design of this diagnostic diverges John McCall2010-08-123-0/+55
| | | | | | | | from GCC's in that we warn on *any* increase in alignment requirements, not just those that are enforced by hardware. Please let us know if this causes major problems for you (which it shouldn't, since it's an optional warning). llvm-svn: 110959
* Fixing the build isn't good enough; back out r110956 and r110953.John McCall2010-08-122-47/+40
| | | | llvm-svn: 110958
* dgregor should write code that compiles.John McCall2010-08-122-7/+9
| | | | llvm-svn: 110956
* Add a ParseAST overload that takes a Sema object, so that the callerDouglas Gregor2010-08-122-36/+41
| | | | | | | | | can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. llvm-svn: 110952
* Fixes block type matching bug. Radar 8302845.Fariborz Jahanian2010-08-121-1/+1
| | | | llvm-svn: 110950
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-1242-7403/+66
| | | | llvm-svn: 110945
* first test commitAnton Yartsev2010-08-121-8/+8
| | | | llvm-svn: 110941
* Downgrade error about nonnull attribute bbeing applied to a function ↵Douglas Gregor2010-08-121-1/+1
| | | | | | without point arguments to a warning llvm-svn: 110939
* Don't emit end-of-file diagnostics like "unterminated conditional" orDouglas Gregor2010-08-123-8/+13
| | | | | | "unterminated string" when we're performing code completion. llvm-svn: 110933
* Added locations and type source info for DeclarationName inside UsingDecl.Abramo Bagnara2010-08-125-37/+41
| | | | llvm-svn: 110912
* Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind ↵Jordy Rose2010-08-123-61/+57
| | | | | | the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup. llvm-svn: 110908
OpenPOWER on IntegriCloud