summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* do not store wchar/char16/char32/intmax width/alignment infoChris Lattner2009-11-123-16/+1
| | | | | | | into TargetInfo, just derive this based on the underlying type. This prevents them from getting out of synch, patch by Ken Dyck! llvm-svn: 86976
* Move warning options into DiagnosticOptions.Daniel Dunbar2009-11-121-8/+7
| | | | llvm-svn: 86968
* Avoid comparing string literals.Daniel Dunbar2009-11-121-3/+3
| | | | llvm-svn: 86967
* PthreadLockChecker doesn't need PreVisitCallExpr() yet. All the current ↵Ted Kremenek2009-11-121-20/+6
| | | | | | logic should be done in PostVisitCallExpr() llvm-svn: 86959
* Add most of the boilerplate logic for a simple pthread_mutux_lock() -> ↵Ted Kremenek2009-11-123-1/+181
| | | | | | pthread_mutex_unlock() checker. We need to add a visitor method to Checker for handling dead symbols in order to detect locks that are not unlocked. llvm-svn: 86958
* Remove obsolete 'struct NullDerefTag'.Ted Kremenek2009-11-121-6/+0
| | | | llvm-svn: 86957
* Use the --with-c-include-dirs configure option.Rafael Espindola2009-11-121-0/+9
| | | | llvm-svn: 86956
* Enhance Checker class (and GRExprEngine) to support PostVisitation for ↵Ted Kremenek2009-11-121-10/+10
| | | | | | CallExprs. No clients (yet). llvm-svn: 86949
* Remove GRExprEngine::EvalCall(). It had a single callsite in GRExprEngine, ↵Ted Kremenek2009-11-121-13/+10
| | | | | | and was easily inlined. llvm-svn: 86948
* Random const correctness, and incidentally use computeDeclContext when buildingJohn McCall2009-11-123-30/+20
| | | | | | a using declaration. llvm-svn: 86942
* Switch PTHManager to using diagnostics for most errors.Daniel Dunbar2009-11-121-24/+15
| | | | | | Also, always give errors on a token-cache PTH failure. llvm-svn: 86939
* Make StoreManager::getSizeInElements() always return DefinedOrUnknownSVal.Zhongxing Xu2009-11-123-9/+8
| | | | llvm-svn: 86932
* Note to self: don't leave debugging statements in the code for four hours.John McCall2009-11-121-2/+0
| | | | llvm-svn: 86931
* Do not use StringRef while using DebugInfo interface.Devang Patel2009-11-121-37/+30
| | | | llvm-svn: 86915
* Improve recovery in a wonky case where one tries to specialize aDouglas Gregor2009-11-121-2/+11
| | | | | | | | | | template template parameter. When building a template-id type, check whether the template-name itself is dependent (even if the template arguments are not!) and handle it as a template-id type. llvm-svn: 86913
* Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category,John McCall2009-11-121-8/+17
| | | | | | | and give that category an explicit test. Generalize the internal diagnostic name. llvm-svn: 86905
* Remove an overly-eager assertion when replacing tokens with anDouglas Gregor2009-11-122-18/+17
| | | | | | | | | | | annotation token, because some of the tokens we're annotating might not be in the set of cached tokens (we could have consumed them unconditionally). Also, move the tentative parsing from ParseTemplateTemplateArgument into the one caller that needs it, improving recovery. llvm-svn: 86904
* Tweak PCH -include handling to make sure it matches the name as would be presentDaniel Dunbar2009-11-112-8/+15
| | | | | | in the predefines buffer. llvm-svn: 86903
* Template argument deduction for template template parameters. ThisDouglas Gregor2009-11-113-52/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | permits, among other things, ripping apart and reconstructing templates via partial specialization: template<typename T> struct DeepRemoveConst { typedef T type; }; template<typename T> struct DeepRemoveConst<const T> { typedef typename DeepRemoveConst<T>::type type; }; template<template<typename> class TT, typename T> struct DeepRemoveConst<TT<T> > { typedef TT<typename DeepRemoveConst<T>::type> type; }; Also, fix a longstanding thinko in the code handling partial ordering of class template partial specializations. We were performing the second deduction without clearing out the results of the first deduction. It's amazing we got through so much code with such a horrendous error :( llvm-svn: 86893
* Fix PR 5422: handle lvalue results when evaluating 'based' ptrtoints as part ofJohn McCall2009-11-111-3/+9
| | | | | | the -Wconversion check. llvm-svn: 86891
* writable atomic property's setter/getter must be in 'lock' step ofFariborz Jahanian2009-11-112-1/+44
| | | | | | | either both synthesized or bith user defined. Implements radar 6557233. llvm-svn: 86887
* Improve diagnostics when a default template argument does not matchDouglas Gregor2009-11-115-108/+207
| | | | | | | | | | | | | | | | | | | | | | | | with its corresponding template parameter. This can happen when we performed some substitution into the default template argument and what we had doesn't match any more, e.g., template<int> struct A; template<typename T, template<T> class X = A> class B; B<long> b; Previously, we'd emit a pretty but disembodied diagnostic showing how the default argument didn't match the template parameter. The diagnostic was good, but nothing tied it to the *use* of the default argument in "B<long>". This commit fixes that. Also, tweak the counting of active template instantiations to avoid counting non-instantiation records, such as those we create for (surprise!) checking default arguments, instantiating default arguments, and performing substitutions as part of template argument deduction. llvm-svn: 86884
* Always initialize the header search object as part of InitializePreprocessor;Daniel Dunbar2009-11-111-1/+7
| | | | | | not doing this has little to no utility. llvm-svn: 86883
* Allow Preprocessor to take ownership of the HeaderSearch object. I think it ↵Daniel Dunbar2009-11-112-3/+10
| | | | | | should probably always own the header search object, but I'm not sure... llvm-svn: 86882
* Sink AttachDependencyFileGen into CreatePreprocessor.Daniel Dunbar2009-11-111-5/+5
| | | | llvm-svn: 86881
* Add DependencyOutputOptions to wrap -M... options, and propogate toDaniel Dunbar2009-11-111-19/+25
| | | | | | CompilerInvocation and clang-cc. llvm-svn: 86880
* Fix ctor vtable name. WIP.Mike Stump2009-11-111-1/+1
| | | | llvm-svn: 86879
* Push ctor vtable construction down further. WIP.Mike Stump2009-11-113-11/+22
| | | | llvm-svn: 86878
* Remove some stale ErrorNodes variables in GRExprEngine and the old buffer ↵Ted Kremenek2009-11-112-12/+12
| | | | | | overflow logic in GRExprEngineInternalChecks.cpp. llvm-svn: 86877
* After drinking caffeine, add the two files missing from the previous submit.Chandler Carruth2009-11-111-0/+20
| | | | | | Sorry about that. llvm-svn: 86869
* Move handling of template parameter packs out of theDouglas Gregor2009-11-112-30/+22
| | | | | | | | | | template-type-parameter specific template argument checking code and up to the template argument checking loop. In theory, this should make variadic templates work better; in practice, they don't well enough for us to care anyway (YET!), so this is mostly a re-organization to simplify CheckTemplateArgument. llvm-svn: 86868
* Refactoring of template-argument checking code to reduce nesting,Douglas Gregor2009-11-112-194/+219
| | | | | | increase sanity. No intended functionality change. llvm-svn: 86866
* Before checking a template template argument against its correspondingDouglas Gregor2009-11-114-39/+175
| | | | | | | | | | | | | | | | | | | | | | | template template parameter, substitute any prior template arguments into the template template parameter. This, for example, allows us to properly check the template template argument for a class such as: template<typename T, template<T Value> class X> struct Foo; The actual implementation of this feature was trivial; most of the change is dedicated to giving decent diagnostics when this substitution goes horribly wrong. We now get a note like: note: while substituting prior template arguments into template template parameter 'X' [with T = float] As part of this change, enabled some very pedantic checking when comparing template template parameter lists, which shook out a bug in our overly-eager checking of default arguments of template template parameters. We now perform only minimal checking of such default arguments when they are initially parsed. llvm-svn: 86864
* Move the ManagerRegistry to the Analysis library to resolve the layering ↵Chandler Carruth2009-11-115-23/+3
| | | | | | violation. llvm-svn: 86863
* Do not eagerly set stop point for arguments. This misleads the debugger in ↵Devang Patel2009-11-111-4/+19
| | | | | | identifying beginning of function body. Instead, create new location to attach with llvm.dbg.declare. This location is only used to find the context of the variable by the code generator, and it is not used to emit line number info. llvm-svn: 86862
* Value initialize non-class array members in ctor'sFariborz Jahanian2009-11-111-1/+8
| | | | | | initializer list. Fixes PR5463. llvm-svn: 86849
* Instantiation of template template parameters for nested templates, e.g.,Douglas Gregor2009-11-111-0/+30
| | | | | | | | | template<typename T> struct X { template<template<T Value> class Y> struct Inner; }; llvm-svn: 86844
* Fix speculative parsing of dependent template names inDouglas Gregor2009-11-112-27/+19
| | | | | | | | | | | | | | | | | | | | | | nested-name-specifiers so that they don't gobble the template name (or operator-function-id) unless there is also a template-argument-list. For example, given T::template apply we would previously consume both "template" and "apply" as part of parsing the nested-name-specifier, then error when we see that there is no "<" starting a template argument list. Now, we parse such constructs tentatively, and back off if the "<" is not present. This allows us to parse dependent template names as one would use them for, e.g., template template parameters: template<typename T, template<class> class X = T::template apply> struct MetaSomething; Also, test default arguments for template template parameters. llvm-svn: 86841
* Add undefined array subscript checker.Zhongxing Xu2009-11-115-1/+64
| | | | llvm-svn: 86837
* Remove the old out-of-bound checking code.Zhongxing Xu2009-11-111-42/+0
| | | | llvm-svn: 86836
* Reimplement out-of-bound array access checker with the new checker interface.Zhongxing Xu2009-11-114-0/+90
| | | | | | Now only one test case is XFAIL'ed. llvm-svn: 86834
* ReturnPointerRangeChecker: use StripCasts() instead of checking for zero indexZhongxing Xu2009-11-111-12/+15
| | | | | | | | explicitly. Fix 80-col violations. llvm-svn: 86833
* Add PreprocessorOutputOptions to CompilerInvocation, and move initialization toDaniel Dunbar2009-11-111-1/+1
| | | | | | clang-cc/Options.cpp llvm-svn: 86828
* Add PreprocessorOutputOptions, for things like -dM, -C, -CC which control -EDaniel Dunbar2009-11-111-10/+16
| | | | | | mode. llvm-svn: 86827
* Simplifiy target feature handling by coalescing all the logic intoDaniel Dunbar2009-11-111-17/+22
| | | | | | InitializeCompileOptions. llvm-svn: 86826
* Allow TextDiagnosticPrinter to have optional ownership of its output stream.Daniel Dunbar2009-11-111-2/+9
| | | | llvm-svn: 86823
* Update CMake.Daniel Dunbar2009-11-111-1/+0
| | | | llvm-svn: 86822
* CastToStructChecker: use 'isStructureType()' instead of 'isRecordType()' to ↵Ted Kremenek2009-11-111-1/+1
| | | | | | determine if a pointer is casted to a struct pointer. This fixes an observed false positive when a value is casted to a union. llvm-svn: 86813
* Fix display of "ANALYZE" statements in AnalysisConsumer by correctly ↵Ted Kremenek2009-11-112-149/+146
| | | | | | resetting the flag indicating that the current Decl* has not yet been displayed. Also move this out of AnalysisManager, since AnalysisManager should not handle text output to the user. llvm-svn: 86812
* Remove public headers for UndefinedArgChecker, AttrNonNullChecker, and ↵Ted Kremenek2009-11-115-19/+60
| | | | | | BadCallChecker, making their implementations completely private. llvm-svn: 86809
OpenPOWER on IntegriCloud