]> granicus.if.org Git - clang/log
clang
16 years agointroduce a new ASTContext::getCanonicalType method. This is the first
Chris Lattner [Sun, 6 Apr 2008 22:41:35 +0000 (22:41 +0000)]
introduce a new ASTContext::getCanonicalType method.  This is the first
step towards fixing PR2189.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49291 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove the old non-parallel test system. 'make' in clang/test now runs
Chris Lattner [Sun, 6 Apr 2008 22:32:01 +0000 (22:32 +0000)]
remove the old non-parallel test system.  'make' in clang/test now runs
the tests in parallel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49290 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse EnumType to simplify some code.
Chris Lattner [Sun, 6 Apr 2008 22:29:16 +0000 (22:29 +0000)]
Use EnumType to simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49289 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake use of EnumType to simplify some code, eliminate warnings
Chris Lattner [Sun, 6 Apr 2008 22:05:18 +0000 (22:05 +0000)]
make use of EnumType to simplify some code, eliminate warnings
when assertions are disabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49288 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake EnumType/RecordType classof predicates simpler and more efficient in
Chris Lattner [Sun, 6 Apr 2008 22:04:54 +0000 (22:04 +0000)]
Make EnumType/RecordType classof predicates simpler and more efficient in
some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49287 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a helper EnumType object for asking about tagtypes for enums.
Chris Lattner [Sun, 6 Apr 2008 21:58:47 +0000 (21:58 +0000)]
add a helper EnumType object for asking about tagtypes for enums.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49286 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotracking API changes arising from r49277
Gabor Greif [Sun, 6 Apr 2008 20:42:52 +0000 (20:42 +0000)]
tracking API changes arising from r49277

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49279 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove a semantic check out of the parser into sema.
Chris Lattner [Sun, 6 Apr 2008 07:49:57 +0000 (07:49 +0000)]
move a semantic check out of the parser into sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49273 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agonow that identifier list parsing is split out, simplify handling of
Chris Lattner [Sun, 6 Apr 2008 06:57:35 +0000 (06:57 +0000)]
now that identifier list parsing is split out, simplify handling of
normal typed argument lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49272 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoreject 'int test(x, x) int x; {}'
Chris Lattner [Sun, 6 Apr 2008 06:50:56 +0000 (06:50 +0000)]
reject 'int test(x, x) int x; {}'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49271 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoreject 'typedef int y; int test(x, y)'.
Chris Lattner [Sun, 6 Apr 2008 06:47:48 +0000 (06:47 +0000)]
reject 'typedef int y; int test(x, y)'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49270 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify Parser::ParseFunctionDeclaratorIdentifierList
Chris Lattner [Sun, 6 Apr 2008 06:39:19 +0000 (06:39 +0000)]
simplify Parser::ParseFunctionDeclaratorIdentifierList

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49269 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosplit parsing of identifier lists in function declarators out into
Chris Lattner [Sun, 6 Apr 2008 06:34:08 +0000 (06:34 +0000)]
split parsing of identifier lists in function declarators out into
their own method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49268 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor simplification
Chris Lattner [Sun, 6 Apr 2008 06:03:03 +0000 (06:03 +0000)]
minor simplification

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49267 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofinish up throw parsing.
Chris Lattner [Sun, 6 Apr 2008 06:02:23 +0000 (06:02 +0000)]
finish up throw parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49266 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosplit code for handling grouping parens in declarators from code that
Chris Lattner [Sun, 6 Apr 2008 05:45:57 +0000 (05:45 +0000)]
split code for handling grouping parens in declarators from code that
handles function argument parens in declarators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49265 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoanother minor simplification
Chris Lattner [Sun, 6 Apr 2008 05:27:21 +0000 (05:27 +0000)]
another minor simplification

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49264 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse token lookahead to simplify some code that is rarely executed.
Chris Lattner [Sun, 6 Apr 2008 05:26:30 +0000 (05:26 +0000)]
Use token lookahead to simplify some code that is rarely executed.
Since it is rare, the cost is not significant and we enjoy the
simplification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49263 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a bug I introduced in my const'ification patch.
Chris Lattner [Sun, 6 Apr 2008 05:25:03 +0000 (05:25 +0000)]
Fix a bug I introduced in my const'ification patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49262 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis patch contains these changes:
Chris Lattner [Sun, 6 Apr 2008 04:47:34 +0000 (04:47 +0000)]
This patch contains these changes:

-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl

Patch by Argiris Kirtzidis!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix css font name, patch by Cédric Venet
Chris Lattner [Sun, 6 Apr 2008 04:37:21 +0000 (04:37 +0000)]
fix css font name, patch by Cédric Venet

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49260 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodon't dereference hte end iterator when inserting at end of buffer.
Chris Lattner [Sun, 6 Apr 2008 04:36:15 +0000 (04:36 +0000)]
don't dereference hte end iterator when inserting at end of buffer.
Patch by Cédric Venet!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49259 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotemplates can't be static.
Chris Lattner [Sun, 6 Apr 2008 04:22:39 +0000 (04:22 +0000)]
templates can't be static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49258 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix a number of const qualification bugs.
Chris Lattner [Sun, 6 Apr 2008 04:11:27 +0000 (04:11 +0000)]
fix a number of const qualification bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49257 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a missing #include
Chris Lattner [Sun, 6 Apr 2008 04:02:29 +0000 (04:02 +0000)]
add a missing #include

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49256 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix handling of implicit int, resolving PR2012 and reverting (and
Chris Lattner [Sat, 5 Apr 2008 06:32:51 +0000 (06:32 +0000)]
Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoStep #1 to fixing PR2012: c89 allows declspecs to be completely
Chris Lattner [Sat, 5 Apr 2008 05:52:15 +0000 (05:52 +0000)]
Step #1 to fixing PR2012: c89 allows declspecs to be completely
missing from function definitions only.  If we see a function
definiton with missing declspecs, just fudge in an int.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49250 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAvoid implicitly including any header files (requested by ckane).
Steve Naroff [Fri, 4 Apr 2008 22:58:22 +0000 (22:58 +0000)]
Avoid implicitly including any header files (requested by ckane).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49241 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRewrite @package (an ObjC 2.0 idiom).
Steve Naroff [Fri, 4 Apr 2008 22:34:24 +0000 (22:34 +0000)]
Rewrite @package (an ObjC 2.0 idiom).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49238 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix MS-specific bug in RewriteTest::RewriteObjCMethodDecl().
Steve Naroff [Fri, 4 Apr 2008 22:23:44 +0000 (22:23 +0000)]
Fix MS-specific bug in RewriteTest::RewriteObjCMethodDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49237 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd BugReporter.cpp to VC++ project file.
Steve Naroff [Fri, 4 Apr 2008 21:24:02 +0000 (21:24 +0000)]
Add BugReporter.cpp to VC++ project file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49233 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSupport MS-specific integer suffixes (i8, i16, i32, i64, i128).
Steve Naroff [Fri, 4 Apr 2008 21:02:54 +0000 (21:02 +0000)]
Support MS-specific integer suffixes (i8, i16, i32, i64, i128).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49229 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2049, updating Eli's patch that fixes to mainline. This produces incorrect
Chris Lattner [Fri, 4 Apr 2008 18:42:16 +0000 (18:42 +0000)]
Fix PR2049, updating Eli's patch that fixes to mainline.  This produces incorrect
code, but the codegen doesn't crash.  I'll file a bugzilla for the AST being wrong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49226 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename ScopedDecl::getContext() -> getContextDecl(). Two motivations:
Steve Naroff [Fri, 4 Apr 2008 18:15:49 +0000 (18:15 +0000)]
Rename ScopedDecl::getContext() -> getContextDecl(). Two motivations:

#1: To be consistent with FieldDecl::getContextDecl(), which serves the same purpose.
#2: From my perspective, getContext() is too general (and used by several other classes for different purposes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49224 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd DeclBase.h to Xcode project.
Steve Naroff [Fri, 4 Apr 2008 18:04:30 +0000 (18:04 +0000)]
Add DeclBase.h to Xcode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49223 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSince isComplexType() no longer returns true for _Complex integers, the code
Chris Lattner [Fri, 4 Apr 2008 16:54:41 +0000 (16:54 +0000)]
Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType().  This fixes PR1960.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49220 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd an isAnyComplexType() method, which returns true for both
Chris Lattner [Fri, 4 Apr 2008 16:51:46 +0000 (16:51 +0000)]
add an isAnyComplexType() method, which returns true for both
integer and FP complexes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49219 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoupdates from David.
Chris Lattner [Fri, 4 Apr 2008 15:59:59 +0000 (15:59 +0000)]
updates from David.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49217 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agovarious bug fixes, add to xcode project.
Chris Lattner [Fri, 4 Apr 2008 15:47:22 +0000 (15:47 +0000)]
various bug fixes, add to xcode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49216 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoinitial checkin of Étoilé runtime support, patch by David Chisnall
Chris Lattner [Fri, 4 Apr 2008 15:45:52 +0000 (15:45 +0000)]
initial checkin of Étoilé runtime support, patch by David Chisnall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49215 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd explicit support for diagnosing implicit function decls.
Steve Naroff [Fri, 4 Apr 2008 14:32:09 +0000 (14:32 +0000)]
Add explicit support for diagnosing implicit function decls.
Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49214 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago- ccc: print generated command line to stdout instead of stderr
Seo Sanghyeon [Fri, 4 Apr 2008 11:02:21 +0000 (11:02 +0000)]
- ccc: print generated command line to stdout instead of stderr
- ccc: quote shell metacharacters in command line to ease copy-and-paste

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49213 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPR1963: Address of function is a constant expression
Seo Sanghyeon [Fri, 4 Apr 2008 09:45:30 +0000 (09:45 +0000)]
PR1963: Address of function is a constant expression

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49212 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix build error: add missing braces.
Torok Edwin [Fri, 4 Apr 2008 06:16:25 +0000 (06:16 +0000)]
fix build error: add missing braces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49209 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIntroduce ContextDecl, patch by Argiris Kirtzidis!
Chris Lattner [Fri, 4 Apr 2008 06:12:32 +0000 (06:12 +0000)]
Introduce ContextDecl, patch by Argiris Kirtzidis!

-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCodegen assignment to self correctly, patch by David Chisnall!
Chris Lattner [Fri, 4 Apr 2008 04:07:35 +0000 (04:07 +0000)]
Codegen assignment to self correctly, patch by David Chisnall!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49201 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIgnore qualifiers when checking vector operands, just like scalar operands.
Nate Begeman [Fri, 4 Apr 2008 01:30:25 +0000 (01:30 +0000)]
Ignore qualifiers when checking vector operands, just like scalar operands.
This prevents things like
a += b[0]; where a is a float4 and b is a float4 * (address_space 1)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49199 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded investigate patch for an occasionally failing assertion (heisenbug?)
Ted Kremenek [Thu, 3 Apr 2008 21:44:24 +0000 (21:44 +0000)]
Added investigate patch for an occasionally failing assertion (heisenbug?)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49193 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove bogus check to prune out analyzing files.
Ted Kremenek [Thu, 3 Apr 2008 21:29:11 +0000 (21:29 +0000)]
Remove bogus check to prune out analyzing files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49191 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore reliably remove '\n' from queries of the location of ccc-analyzer
Ted Kremenek [Thu, 3 Apr 2008 21:17:14 +0000 (21:17 +0000)]
More reliably remove '\n' from queries of the location of ccc-analyzer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49189 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse full path to ccc-analyzer.
Ted Kremenek [Thu, 3 Apr 2008 20:08:18 +0000 (20:08 +0000)]
Use full path to ccc-analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49187 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTeach clang how to codegen punpcklbw and punpcklwd
Nate Begeman [Thu, 3 Apr 2008 19:58:06 +0000 (19:58 +0000)]
Teach clang how to codegen punpcklbw and punpcklwd

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49186 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake typedefs public.
Ted Kremenek [Thu, 3 Apr 2008 19:52:45 +0000 (19:52 +0000)]
Make typedefs public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49185 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBetter range highlight for undefined-argument checks.
Ted Kremenek [Thu, 3 Apr 2008 18:52:25 +0000 (18:52 +0000)]
Better range highlight for undefined-argument checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49184 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen reporting "bad receiver" warnings, highlight the receiver.
Ted Kremenek [Thu, 3 Apr 2008 18:46:16 +0000 (18:46 +0000)]
When reporting "bad receiver" warnings, highlight the receiver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49183 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse "getRanges" in default implementation of "getEndPath" to determine
Ted Kremenek [Thu, 3 Apr 2008 18:00:37 +0000 (18:00 +0000)]
Use "getRanges" in default implementation of "getEndPath" to determine
the ranges of highlighted elements in the source code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49181 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to use
Ted Kremenek [Thu, 3 Apr 2008 17:57:38 +0000 (17:57 +0000)]
Hooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to use
the new BugReporter interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49180 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMark nodes as sinks that GRAuditor says should be marked as sinks.
Ted Kremenek [Thu, 3 Apr 2008 17:56:48 +0000 (17:56 +0000)]
Mark nodes as sinks that GRAuditor says should be marked as sinks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49179 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse logical line number for BUGLINE.
Ted Kremenek [Thu, 3 Apr 2008 17:55:57 +0000 (17:55 +0000)]
Use logical line number for BUGLINE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49178 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "getLogicalLineNumber" and "getLogicalColumnNumber" to FullSourceLoc.
Ted Kremenek [Thu, 3 Apr 2008 17:55:15 +0000 (17:55 +0000)]
Added "getLogicalLineNumber" and "getLogicalColumnNumber" to FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49177 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove handling of impossible "-?" option.
Sam Bishop [Thu, 3 Apr 2008 14:29:47 +0000 (14:29 +0000)]
Remove handling of impossible "-?" option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49161 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotrivial whitespace fix
Sam Bishop [Thu, 3 Apr 2008 14:20:28 +0000 (14:20 +0000)]
trivial whitespace fix

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49160 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle the case when getEndPath() returns NULL.
Ted Kremenek [Thu, 3 Apr 2008 07:33:55 +0000 (07:33 +0000)]
Handle the case when getEndPath() returns NULL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49155 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't run the analyzer on files whose language is "unknown"
Ted Kremenek [Thu, 3 Apr 2008 07:14:59 +0000 (07:14 +0000)]
Don't run the analyzer on files whose language is "unknown"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49152 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded guard for printing out PathDiagnostics whose last element ends with
Ted Kremenek [Thu, 3 Apr 2008 07:13:10 +0000 (07:13 +0000)]
Added guard for printing out PathDiagnostics whose last element ends with
a piece with a SourceLocation that does not have a FileID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49151 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSome cleanups in EscapeText and AddLineNumbers. Still investigating performance
Ted Kremenek [Thu, 3 Apr 2008 07:12:29 +0000 (07:12 +0000)]
Some cleanups in EscapeText and AddLineNumbers.  Still investigating performance
issues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49150 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove impossible "-?" option.
Ted Kremenek [Thu, 3 Apr 2008 07:11:44 +0000 (07:11 +0000)]
Remove impossible "-?" option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49149 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "isFileID()" to FullSourceLoc.
Ted Kremenek [Thu, 3 Apr 2008 07:11:38 +0000 (07:11 +0000)]
Added "isFileID()" to FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49148 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCSS/HTML generation tweaks for index.html: Remove special "classes" for <td>
Ted Kremenek [Thu, 3 Apr 2008 05:50:51 +0000 (05:50 +0000)]
CSS/HTML generation tweaks for index.html: Remove special "classes" for <td>
elements in table so that sorttable can sort them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49145 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2081 (problems codegen'ing some recursive structures) patch
Chris Lattner [Thu, 3 Apr 2008 05:50:42 +0000 (05:50 +0000)]
Fix PR2081 (problems codegen'ing some recursive structures) patch
by Lauro Venancio!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49144 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCreated a destructor so that the top-level decls can be deleted.
Sam Bishop [Thu, 3 Apr 2008 05:35:20 +0000 (05:35 +0000)]
Created a destructor so that the top-level decls can be deleted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49142 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTemporarily make the Decl virtual destructor public, so that calls to "delete"
Sam Bishop [Thu, 3 Apr 2008 05:29:20 +0000 (05:29 +0000)]
Temporarily make the Decl virtual destructor public, so that calls to "delete"
can be tested on derived classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49141 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd back bug name to PathDiagnostic.
Ted Kremenek [Thu, 3 Apr 2008 05:23:19 +0000 (05:23 +0000)]
Add back bug name to PathDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49139 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a bug where we didn't check the RHS for null, we checked
Chris Lattner [Thu, 3 Apr 2008 05:07:25 +0000 (05:07 +0000)]
Fix a bug where we didn't check the RHS for null, we checked
the LHS for null twice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49138 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoqualifier comparisons should be done on canonical types.
Chris Lattner [Thu, 3 Apr 2008 05:07:04 +0000 (05:07 +0000)]
qualifier comparisons should be done on canonical types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49137 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCall delete on the deserialized TranslationUnit object.
Sam Bishop [Thu, 3 Apr 2008 05:03:34 +0000 (05:03 +0000)]
Call delete on the deserialized TranslationUnit object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49136 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCall "delete" on the body of FunctionDecls.
Sam Bishop [Thu, 3 Apr 2008 05:01:04 +0000 (05:01 +0000)]
Call "delete" on the body of FunctionDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49135 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen creating PathDiagnostics, created a trimmed graph first and report the
Ted Kremenek [Thu, 3 Apr 2008 04:59:14 +0000 (04:59 +0000)]
When creating PathDiagnostics, created a trimmed graph first and report the
BFS path to the root.  This also avoids problems with loops in the ExplodedGraph.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49133 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded node_iterator to ExplodedGraph to allow iteration over all nodes in
Ted Kremenek [Thu, 3 Apr 2008 04:58:29 +0000 (04:58 +0000)]
Added node_iterator to ExplodedGraph to allow iteration over all nodes in
the graph.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49132 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdated Xcode project to include BugReporter.[cpp,h].
Ted Kremenek [Thu, 3 Apr 2008 04:43:40 +0000 (04:43 +0000)]
Updated Xcode project to include BugReporter.[cpp,h].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49128 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCreated new path-sensitive bug-reporting scheme based on the classes
Ted Kremenek [Thu, 3 Apr 2008 04:42:52 +0000 (04:42 +0000)]
Created new path-sensitive bug-reporting scheme based on the classes
"BugReporter" and "BugDescription".  BugDescription is used to describe
a bug and provide pieces of the PathDiagnostic, and BugReporter creates
the actual PathDiagnostic by crawling through the ExplodedGraph.

Migrated checks done by GRSimpleVals to be reported using the new BugReporter
mechanism.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49127 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded missing #ifndef...#define...#endif directives to protect against
Ted Kremenek [Thu, 3 Apr 2008 04:38:39 +0000 (04:38 +0000)]
Added missing #ifndef...#define...#endif directives to protect against
double includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49126 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCSS tweaking on blue boxes.
Ted Kremenek [Wed, 2 Apr 2008 22:50:50 +0000 (22:50 +0000)]
CSS tweaking on blue boxes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49121 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago80 col violation
Ted Kremenek [Wed, 2 Apr 2008 22:08:09 +0000 (22:08 +0000)]
80 col violation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49120 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded more PathDiagnostic rendering for terminators: switch, goto, loops.
Ted Kremenek [Wed, 2 Apr 2008 22:03:53 +0000 (22:03 +0000)]
Added more PathDiagnostic rendering for terminators: switch, goto, loops.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49119 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBlue diagnostic boxes.
Ted Kremenek [Wed, 2 Apr 2008 21:14:04 +0000 (21:14 +0000)]
Blue diagnostic boxes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49117 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded path sequence numbers in HTML output of PathDiagnostics.
Ted Kremenek [Wed, 2 Apr 2008 21:04:20 +0000 (21:04 +0000)]
Added path sequence numbers in HTML output of PathDiagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49116 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix initialization bug.
Ted Kremenek [Wed, 2 Apr 2008 20:44:27 +0000 (20:44 +0000)]
Fix initialization bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49115 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEmbed BUGLINE, BUGFILE, BUGPATHLENGTH in the emitted HTML file.
Ted Kremenek [Wed, 2 Apr 2008 20:44:16 +0000 (20:44 +0000)]
Embed BUGLINE, BUGFILE, BUGPATHLENGTH in the emitted HTML file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49114 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMade bug index tables sortable.
Ted Kremenek [Wed, 2 Apr 2008 20:43:36 +0000 (20:43 +0000)]
Made bug index tables sortable.
Added line number, file information, path length, for each bug report.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49113 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "back()" method to PathDiagnostic to access the last piece in a path.
Ted Kremenek [Wed, 2 Apr 2008 20:35:01 +0000 (20:35 +0000)]
Added "back()" method to PathDiagnostic to access the last piece in a path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49112 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitial work on CSS in generated index.html.
Ted Kremenek [Wed, 2 Apr 2008 18:42:49 +0000 (18:42 +0000)]
Initial work on CSS in generated index.html.
Added "-V/--view" option to view index.html after it has been generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49108 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfac...
Steve Naroff [Wed, 2 Apr 2008 18:30:49 +0000 (18:30 +0000)]
Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort.

I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitial support for generating index.html file.
Ted Kremenek [Wed, 2 Apr 2008 18:03:36 +0000 (18:03 +0000)]
Initial support for generating index.html file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49104 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPut "BUGDESC" comment tag on its own line.
Ted Kremenek [Wed, 2 Apr 2008 18:03:20 +0000 (18:03 +0000)]
Put "BUGDESC" comment tag on its own line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49103 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoShorted bug-description.
Ted Kremenek [Wed, 2 Apr 2008 18:02:54 +0000 (18:02 +0000)]
Shorted bug-description.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49102 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify some code by using PointerLikeType.
Chris Lattner [Wed, 2 Apr 2008 17:45:06 +0000 (17:45 +0000)]
simplify some code by using PointerLikeType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49101 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a common base class "PointerLikeType" for PointerType and ReferenceType,
Chris Lattner [Wed, 2 Apr 2008 17:35:06 +0000 (17:35 +0000)]
add a common base class "PointerLikeType" for PointerType and ReferenceType,
allowing them to be treated the same in some contexts.  A suggestion for a
better name is welcome :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoproperly handle array decay in objc message exprs.
Chris Lattner [Wed, 2 Apr 2008 17:17:33 +0000 (17:17 +0000)]
properly handle array decay in objc message exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49098 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimprove error to be something end users will actually understand :)
Chris Lattner [Wed, 2 Apr 2008 17:15:17 +0000 (17:15 +0000)]
improve error to be something end users will actually understand :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49097 91177308-0d34-0410-b5e6-96231b3b80d8