summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* More objc gc's ir-gen fixes.Fariborz Jahanian2009-02-201-3/+8
| | | | llvm-svn: 65097
* make the redeclaration case faster for the common instance of a redeclarationChris Lattner2009-02-201-8/+19
| | | | | | | | where there is exactly one existing declaration. This is common. this speeds up clang about 3% on cocoa.h for me 0.165 -> 0.160s llvm-svn: 65096
* 80 colsChris Lattner2009-02-201-1/+2
| | | | llvm-svn: 65095
* slight code simplifications.Chris Lattner2009-02-201-15/+12
| | | | llvm-svn: 65094
* Deox and Capitolize.Mike Stump2009-02-201-3/+3
| | | | llvm-svn: 65093
* map source ranges through macro expansions. Before:Chris Lattner2009-02-201-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ (no ranges on the second diagnostics) After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ~~~ ^ ~~~ (ranges!) llvm-svn: 65090
* Fix spacing.Mike Stump2009-02-201-1/+1
| | | | llvm-svn: 65089
* refactor, pass ranges down instead of the whole Chris Lattner2009-02-201-9/+15
| | | | | | DiagnosticInfo. llvm-svn: 65088
* Fix crash from <rdar://problem/6562655>: 'init' method only return a ↵Ted Kremenek2009-02-201-2/+5
| | | | | | receiver alias if the return type is a location. llvm-svn: 65084
* replace a dirty hack with a clean solution. Too bad we can't Chris Lattner2009-02-192-5/+15
| | | | | | use Blocks for our callbacks ;-) llvm-svn: 65083
* retain/release checker: Generate an intermediate simulation node for "leak"Ted Kremenek2009-02-191-17/+38
| | | | | | | | transitions and then generate a subsequent node that removes the dead symbol bindings. This should drastically improve caching in the simulation graph when retain-counted objects are being tracked. llvm-svn: 65082
* Fix a long standard problem with clang retaining "too much" sugar Chris Lattner2009-02-192-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | information about types. We often print diagnostics where we say "foo_t" is bad, but the user doesn't know how foo_t is declared (because it is a typedef). Fix this by expanding sugar when present in a diagnostic (and not one of a few special cases, like vectors). Before: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)') MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ llvm-svn: 65081
* Added a new method to GRStmtNodeBuilder to build nodes using an arbitraryTed Kremenek2009-02-191-4/+7
| | | | | | | PostStmt program point. This allows clients to pass in PostStmtCustom program points. llvm-svn: 65080
* pretty printing vector types should print the element type, not just the ↵Chris Lattner2009-02-191-0/+1
| | | | | | attribute. llvm-svn: 65078
* More objc's gc ir-gen stuff.Fariborz Jahanian2009-02-193-40/+45
| | | | llvm-svn: 65077
* GetTypeForDeclarator can return null on error now, handle this.Chris Lattner2009-02-191-1/+4
| | | | llvm-svn: 65076
* Extend Evaluate() to fold (int) <pointer type>.Daniel Dunbar2009-02-191-4/+11
| | | | | | | | | | - PR3463, PR3398, <rdar://problem/6553401> crash on relocatable symbol addresses as constants in static locals. - There are many more scenarious we could handle (like arithmetic on such an int) but this is the main use case. llvm-svn: 65074
* Simplify, no functionality change.Daniel Dunbar2009-02-191-6/+6
| | | | llvm-svn: 65073
* Fix another PTH warning that should not be a note.Ted Kremenek2009-02-191-1/+1
| | | | llvm-svn: 65072
* Make PTH warnings actual warnings instead of 'notes'.Ted Kremenek2009-02-191-1/+1
| | | | llvm-svn: 65071
* Add enough checking to ensure that non-constant block literals don'tMike Stump2009-02-195-5/+21
| | | | | | | appear to be constant. I'll probably redo this and throw it all away later once we have codegen for BlockDeclRefExprs. llvm-svn: 65070
* Remove IRgen constant emission assumption that LValue APValue resultsDaniel Dunbar2009-02-191-15/+31
| | | | | | | | | only occur for pointer types; they are also possible for integer types now. - No intended functionality change, IntExprEvaluate doesn't return LValue results yet. llvm-svn: 65066
* Change IntExprEvaluator to operate on an APValue not an APSInt.Daniel Dunbar2009-02-191-37/+55
| | | | | | - Prep for handling lvalues, no intended functionality change. llvm-svn: 65063
* Arguments to unordered comparison builtins may need implicit casts.Daniel Dunbar2009-02-191-0/+6
| | | | | | - <rdar://problem/6094103> sema fails to promote type arguments to __builtin_isgreater (and friends) llvm-svn: 65059
* Add irgen support for the noinline attribute.Anders Carlsson2009-02-191-0/+3
| | | | llvm-svn: 65056
* Add sema support for the noinline attribute.Anders Carlsson2009-02-191-1/+24
| | | | llvm-svn: 65055
* Add another IntExprEvaluator::Success overload to suck up remained ofDaniel Dunbar2009-02-191-43/+49
| | | | | | | | | | | | | | | | | | manual setting of the Result. - Idiom now enforces that result will always have correct width and type; this exposed three new bugs: o Enum constant decl value can have different width than type (PR3173). o EvaluateInteger should not run an IntExprEvaluator over non-integral expressions. o FloatExprEvaluate was not handling casts correctly (it was evaluating the cast in the IntExprEvaluator!). llvm-svn: 65053
* fix PR3609, emit:Chris Lattner2009-02-191-1/+1
| | | | | | | | | | | | | | t.c:1:10: error: missing terminating '>' character #include <stdio.h ^ instead of: t.c:1:10: error: missing terminating " character #include <stdio.h ^ llvm-svn: 65052
* Generate the conservative objc gc's API for now.Fariborz Jahanian2009-02-191-0/+7
| | | | llvm-svn: 65051
* retain/release checker: Fix crasher when the leak site is the same ↵Ted Kremenek2009-02-191-12/+20
| | | | | | expression that allocates an object. llvm-svn: 65047
* Fix PR3619 by properly considering size modifiers and type quals whenChris Lattner2009-02-191-2/+2
| | | | | | uniquing array types. llvm-svn: 65046
* only track integer and pointer values for now.Zhongxing Xu2009-02-191-2/+7
| | | | llvm-svn: 65041
* Add IntExprEvaluator::Success method.Daniel Dunbar2009-02-191-174/+77
| | | | | | | | | | | - Handles assignment to Result with appropriate type. - Simplifies & encapsulates most direct handling of the Result value; prep for allowing IntExprEvaluator to deal with LValue APValues. - No intended functionality change. llvm-svn: 65038
* Convert the offset to signed before making an ElementRegion with it. It seemsZhongxing Xu2009-02-191-1/+11
| | | | | | | that this problem arises from time to time. We should find a fundamental solution for it. llvm-svn: 65035
* Don't emit K&R unprototyped function definitions as varargs.Daniel Dunbar2009-02-192-14/+37
| | | | | | - <rdar://problem/6584606> clang/x86-64 - too many reg saves llvm-svn: 65032
* Add Type::getAsFunctionNoProtoDaniel Dunbar2009-02-191-0/+4
| | | | llvm-svn: 65031
* only do one DenseMap lookup instead of two (one to find out if there isChris Lattner2009-02-191-12/+12
| | | | | | already an entry and one to insert). llvm-svn: 65030
* minor simplification.Chris Lattner2009-02-191-3/+3
| | | | llvm-svn: 65029
* use early exit to reduce indentation.Chris Lattner2009-02-191-25/+26
| | | | llvm-svn: 65028
* fix a bug introduced in my previous patch: moving clang headers to theChris Lattner2009-02-191-2/+2
| | | | | | | | "after" group instead of the system group makes it so #include <limits.h> picks up the *system* limits.h file before clang's. This causes a failure on linux and is definitely not what we want. llvm-svn: 65026
* fix warning in no-assert mode.Chris Lattner2009-02-191-3/+1
| | | | llvm-svn: 65024
* Emit the correct diagnostics when we constant fold an array size to a ↵Anders Carlsson2009-02-191-3/+13
| | | | | | negative value. llvm-svn: 65023
* don't new[] an empty array when an AttributeList has Chris Lattner2009-02-191-5/+9
| | | | | | | zero expression arguments. This eliminates 2579 1-byte mallocs when parsing Cocoa.h. llvm-svn: 65022
* Emission of global variable initialializer was broken in rareDaniel Dunbar2009-02-191-1/+23
| | | | | | | | | | | situation where a tentative decl was emitted *after* the actual initialization. This occurs in some rare situations with static decls. - PR3613. - I'm not particularly happy with this fix, but I don't see a simpler or more elegant solution yet. llvm-svn: 65018
* Handle the GNU void* and function pointer arithmetic extensions for constant ↵Anders Carlsson2009-02-191-1/+7
| | | | | | expressions as well. llvm-svn: 65013
* PR3614: "ignoring nonexistent directory" should print the -isysroot Chris Lattner2009-02-191-2/+2
| | | | | | mapped path, not the requested path. llvm-svn: 65009
* fix another typo gabor noticedChris Lattner2009-02-191-1/+1
| | | | llvm-svn: 65006
* Implemented simple check in <rdar://problem/6600344>: When the receiver of aTed Kremenek2009-02-192-3/+59
| | | | | | | message expression is nil and the return type is struct then the returned value is undefined or potentially garbage. llvm-svn: 65003
* Fit 80col and fix indentation.Mike Stump2009-02-191-263/+264
| | | | llvm-svn: 65000
* Fix spacing.Mike Stump2009-02-191-1/+1
| | | | llvm-svn: 64998
OpenPOWER on IntegriCloud