summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Call GRExprEngine::setTransferFunctions() after registering all Checkers. ↵Ted Kremenek2009-11-251-2/+2
| | | | | | This allows GRTransferFuncs::RegisterChecks() to always be called after all checkers have been registered. llvm-svn: 89887
* Consolidate logic in ActionInlineCall by having it call ActionGRExprEngine ↵Ted Kremenek2009-11-251-19/+3
| | | | | | instead of replicating most of its logic (and missing pieces). llvm-svn: 89886
* Make RegisterInternalChecks() part of GRExprEngine's private implementation ↵Ted Kremenek2009-11-251-1/+0
| | | | | | by making it a static function within GRExprEngine.cpp. llvm-svn: 89884
* Register internal checks with GRExprEngine when it is constructed, not ↵Ted Kremenek2009-11-251-2/+0
| | | | | | manually in AnalysisConsumer.cpp. llvm-svn: 89883
* Fix some uses of fprintf/stderr without a prototype.Daniel Dunbar2009-11-251-2/+2
| | | | llvm-svn: 89858
* Add clang -cc1 parsing for frontend options.Daniel Dunbar2009-11-251-1/+1
| | | | llvm-svn: 89856
* Parse C++ member check attributes - base_check, hiding, and override.Alexis Hunt2009-11-252-0/+8
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* Eliminate CXXConditionDeclExpr with extreme prejudice.Douglas Gregor2009-11-254-7/+12
| | | | | | | | | | | | | | | | | All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. llvm-svn: 89817
* Clean up the AST for while loops and fix several problems withDouglas Gregor2009-11-242-0/+2
| | | | | | | | | | | | | | | | | cleanups for while loops: 1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g., while (shared_ptr<WorkInt> p = getWorkItem()) { // ... } 2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g., while (blah) RAIIObject raii(blah+1); llvm-svn: 89800
* Explicitly store the condition variable within switch statements, andDouglas Gregor2009-11-242-0/+2
| | | | | | | make sure that this variable is destroyed when we exit the switch statement. llvm-svn: 89776
* Explicitly track the condition variable within an "if" statement,Douglas Gregor2009-11-232-0/+2
| | | | | | | | | rather than burying it in a CXXConditionDeclExpr (that occassionally hides behind implicit conversions). Similar changes for switch, while, and do-while will follow, then the removal of CXXConditionDeclExpr. This commit is the canary. llvm-svn: 89717
* Add clang -cc1 parsing of diagnostic options.Daniel Dunbar2009-11-231-1/+1
| | | | llvm-svn: 89716
* Put back hard-coded paths for win32 until I figure out what happened to ↵John Thompson2009-11-231-0/+19
| | | | | | failed tests. llvm-svn: 89677
* Reorder the header search a bit so that it matches gcc exactly:Rafael Espindola2009-11-231-5/+7
| | | | | | | *) the ../backward dir is the last in libstdc++ to be searched *) If compiling c++, the c++ headers are searched first llvm-svn: 89661
* Centralize and complete the computation of value- and type-dependence for ↵Douglas Gregor2009-11-231-1/+1
| | | | | | DeclRefExprs llvm-svn: 89649
* Add clang -cc1 parsing of analyzer options.Daniel Dunbar2009-11-221-2/+2
| | | | llvm-svn: 89629
* Define __SIG_ATOMIC_WIDTH__ for use in stdint.h.Ken Dyck2009-11-221-0/+1
| | | | llvm-svn: 89597
* This patch implements objective-c's 'SEL' type as a built-inFariborz Jahanian2009-11-212-0/+12
| | | | | | | | | | | | | | | | | | type and fixes a long-standing code gen. crash reported in at least two PRs and a radar. (radar 7405040 and pr5025). There are couple of remaining issues that I would like for Ted. and Doug to look at: Ted, please look at failure in Analysis/MissingDealloc.m. I have temporarily added an expected-warning to make the test pass. This tests has a declaration of 'SEL' type which may not co-exist with the new changes. Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp. I think the changes which I have ifdef'ed out are correct. They need be considered for in a few Indexer/PCH test cases. llvm-svn: 89561
* Added rudimentary C++0x attribute support.Alexis Hunt2009-11-212-0/+2
| | | | | | | | | | | | | | The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) llvm-svn: 89543
* Revised Win32 include path to search highest version in registry, plus ↵John Thompson2009-11-211-55/+109
| | | | | | platform SDK path llvm-svn: 89517
* Fix refactoro, clang-cc wasn't properly reporting errors when opening an ↵Daniel Dunbar2009-11-201-5/+5
| | | | | | output file failed. llvm-svn: 89502
* Add clang -cc1 parsing of CodeGenOptions.Daniel Dunbar2009-11-201-1/+2
| | | | llvm-svn: 89464
* Fix some default in the option classes, and some CompilerInvocation argificationDaniel Dunbar2009-11-191-15/+12
| | | | | | errors. llvm-svn: 89388
* Define __WCHAR_WIDTH__ for use in stdint.h.Ken Dyck2009-11-191-0/+1
| | | | llvm-svn: 89353
* Add __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in Ken Dyck2009-11-191-0/+1
| | | | | | stdint.h. llvm-svn: 89348
* Add __SIZE_WIDTH__ to eventually replace __SIZE_TYPE__ in stdint.h.Ken Dyck2009-11-191-0/+1
| | | | llvm-svn: 89346
* Restore __INTMAX_TYPE__, __UINTMAX_TYPE__, __PTRDIFF_TYPE__, andKen Dyck2009-11-191-0/+4
| | | | | | | __INTPTR_TYPE__ as the last is used in the test/CodeGen/const-init.c and all could potentially be in use in the wild. My apologies. llvm-svn: 89345
* Remove __PTRDIFF_TYPE__ as it is no longer needed by stdint.h. It has been Ken Dyck2009-11-191-1/+0
| | | | | | replaced with __PTRDIFF_WIDTH__. llvm-svn: 89344
* Add __PTRDIFF_WIDTH__ macro to eventually replace __PTRDIFF_TYPE__ in stdint.h.Ken Dyck2009-11-191-0/+1
| | | | llvm-svn: 89342
* Remove __INTPTR_TYPE__ as it is no longer needed by stdint.h, which usesKen Dyck2009-11-191-1/+0
| | | | | | __INTPTR_WIDTH__ instead. llvm-svn: 89340
* Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.Daniel Dunbar2009-11-191-1/+0
| | | | llvm-svn: 89333
* clang-cc: Remove some more llvm::cl::init arguments, by only setting values whenDaniel Dunbar2009-11-191-1/+1
| | | | | | | | the argument is given. Also, tweak Opt.Sysroot defaulting. llvm-svn: 89318
* Change -code-completion-debug-printer to -no-code-completion-debug-printer.Daniel Dunbar2009-11-191-6/+6
| | | | | | Also, tweak a few help strings and update CompilerInvocation serialization for prev change. llvm-svn: 89317
* Predefine __INTPTR_WIDTH__ for future use in stdint.h.Ken Dyck2009-11-181-0/+1
| | | | llvm-svn: 89231
* Remove the __INTMAX_TYPE__ and __UINTMAX_TYPE__ built-in macros as they are noKen Dyck2009-11-181-2/+0
| | | | | | longer used by stdint.h. llvm-svn: 89230
* Use llvm::sys::Path to check isAbsolute, instead of hard coding. Also, ↵Daniel Dunbar2009-11-181-3/+2
| | | | | | remove random FIXME (?). llvm-svn: 89229
* Predefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros inKen Dyck2009-11-181-0/+8
| | | | | | stdint.h. llvm-svn: 89203
* Add SourceLocations to ObjCClassDecl for the class identifiers referenced by ↵Ted Kremenek2009-11-183-3/+10
| | | | | | @class. llvm-svn: 89170
* Pass source locations of identifiers referenced by @class through ↵Ted Kremenek2009-11-171-1/+2
| | | | | | Action::ActOnForwardClassDeclaration(). llvm-svn: 89162
* recognize .hpp as c++ (needed for ./configure'ing boost)Nuno Lopes2009-11-171-1/+1
| | | | llvm-svn: 89100
* add Fedora 11 include path. what a crap..Nuno Lopes2009-11-171-0/+5
| | | | llvm-svn: 89098
* Simplify CompilerInvocation::toArgs, now that LangOptions handling is more ↵Daniel Dunbar2009-11-171-6/+6
| | | | | | predictable. llvm-svn: 89074
* Move -fnext-runtime defaulting to driver (and change clang-cc default toDaniel Dunbar2009-11-171-1/+2
| | | | | | -fnext-runtime), instead of using getDefaultLangOptions. llvm-svn: 89058
* Silence some warnings produced by Clang, and add a missing headerDouglas Gregor2009-11-171-7/+7
| | | | llvm-svn: 89051
* Add initial cut at CompilerInvocation::toArgs, which "serializes" the ↵Daniel Dunbar2009-11-172-0/+548
| | | | | | | | CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1). - Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code. llvm-svn: 89049
* Simplify PreprocessorOptions, it doesn't need abstracted field access.Daniel Dunbar2009-11-173-18/+16
| | | | llvm-svn: 89047
* Remove unused IsCXXAware and IgnoreSysRoots option from ↵Daniel Dunbar2009-11-171-2/+2
| | | | | | HeaderSearchOptions::Entry. llvm-svn: 89035
* Store more information in HeaderSearchOptions so that its initialization is notDaniel Dunbar2009-11-161-1/+8
| | | | | | language dependent. llvm-svn: 88981
* First part of changes to eliminate problems with cv-qualifiers andDouglas Gregor2009-11-162-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sugared types. The basic problem is that our qualifier accessors (getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at the current QualType and not at any qualifiers that come from sugared types, meaning that we won't see these qualifiers through, e.g., typedefs: typedef const int CInt; typedef CInt Self; Self.isConstQualified() currently returns false! Various bugs (e.g., PR5383) have cropped up all over the front end due to such problems. I'm addressing this problem by splitting each qualifier accessor into two versions: - the "local" version only returns qualifiers on this particular QualType instance - the "normal" version that will eventually combine qualifiers from this QualType instance with the qualifiers on the canonical type to produce the full set of qualifiers. This commit adds the local versions and switches a few callers from the "normal" version (e.g., isConstQualified) over to the "local" version (e.g., isLocalConstQualified) when that is the right thing to do, e.g., because we're printing or serializing the qualifiers. Also, switch a bunch of Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType() expressions over to Context.hasSameUnqualifiedType(T1, T2) llvm-svn: 88969
* Use configure options for searching for libstdc++.Rafael Espindola2009-11-161-79/+47
| | | | llvm-svn: 88945
OpenPOWER on IntegriCloud