]> granicus.if.org Git - clang/log
clang
16 years agoThe "unused ivar" check now has a category: "Optimization"
Ted Kremenek [Sun, 21 Sep 2008 18:58:22 +0000 (18:58 +0000)]
The "unused ivar" check now has a category: "Optimization"

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

16 years agoBuilt-in checks now have a category: "Logic Errors"
Ted Kremenek [Sun, 21 Sep 2008 18:57:28 +0000 (18:57 +0000)]
Built-in checks now have a category: "Logic Errors"

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

16 years agoAdded experimental "intelligent-sizing" of HTML message bubbles based on the contents...
Ted Kremenek [Sun, 21 Sep 2008 18:52:59 +0000 (18:52 +0000)]
Added experimental "intelligent-sizing" of HTML message bubbles based on the contents of the message.

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

16 years agoRemove debugging message.
Ted Kremenek [Sun, 21 Sep 2008 18:26:58 +0000 (18:26 +0000)]
Remove debugging message.

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

16 years agoUnbreak ccc-analyzer: getcwd is from package Cwd
Ted Kremenek [Sun, 21 Sep 2008 18:26:19 +0000 (18:26 +0000)]
Unbreak ccc-analyzer: getcwd is from package Cwd

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

16 years agoPatch by Richard Godbee:
Ted Kremenek [Sun, 21 Sep 2008 18:04:49 +0000 (18:04 +0000)]
Patch by Richard Godbee:

Output to .info files the absolute paths to files that were rejected by the
parser or crashed the analyzer.

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

16 years agoscan-build now prints out bug categories.
Ted Kremenek [Sun, 21 Sep 2008 06:58:09 +0000 (06:58 +0000)]
scan-build now prints out bug categories.

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

16 years agoAdd a bug category for NSError** checks.
Ted Kremenek [Sun, 21 Sep 2008 06:57:40 +0000 (06:57 +0000)]
Add a bug category for NSError** checks.

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

16 years agoHave ScanView.py generate a "<td></td>" pair in the output HTML instead of having...
Ted Kremenek [Sun, 21 Sep 2008 03:55:51 +0000 (03:55 +0000)]
Have ScanView.py generate a "<td></td>" pair in the output HTML instead of having scan-build output an empty (and possibly unused) <td>.

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

16 years agoUpdate VS projects.
Cedric Venet [Sat, 20 Sep 2008 18:03:16 +0000 (18:03 +0000)]
Update VS projects.

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

16 years agoAdd "category" to BugTypes, allowing bugs to be grouped.
Ted Kremenek [Sat, 20 Sep 2008 04:23:38 +0000 (04:23 +0000)]
Add "category" to BugTypes, allowing bugs to be grouped.
Changed casing of many bug names.  The convention will be to have bug names (mostly) lower cased, and categories use some capitalization.

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

16 years agoAdd PostStore, a new ProgramPoint to distinguish between 'stores' and other PostStmts.
Ted Kremenek [Sat, 20 Sep 2008 01:50:34 +0000 (01:50 +0000)]
Add PostStore, a new ProgramPoint to distinguish between 'stores' and other PostStmts.

GRExprEngine:
  Use PostStore in EvalStore.
  Use a second version of EvalStore in EvalBinaryOperator to associate the store with the expression on the LHS.

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

16 years agoMake scan-view more robust / friendly when bug reporting fails.
Daniel Dunbar [Sat, 20 Sep 2008 01:43:16 +0000 (01:43 +0000)]
Make scan-view more robust / friendly when bug reporting fails.

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

16 years agoAdd initial implementation of scan-view
Daniel Dunbar [Fri, 19 Sep 2008 23:32:11 +0000 (23:32 +0000)]
Add initial implementation of scan-view
 - Web based interface to static analyzer.

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

16 years agoAdd REPORTBUG marker to scan-build.
Daniel Dunbar [Fri, 19 Sep 2008 23:18:44 +0000 (23:18 +0000)]
Add REPORTBUG marker to scan-build.

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

16 years agoTest case for transfer function logic of const casts.
Ted Kremenek [Fri, 19 Sep 2008 20:53:52 +0000 (20:53 +0000)]
Test case for transfer function logic of const casts.

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

16 years agoBug fix: for the base transfer function logic for casts, handle const casts as just...
Ted Kremenek [Fri, 19 Sep 2008 20:51:22 +0000 (20:51 +0000)]
Bug fix: for the base transfer function logic for casts, handle const casts as just propagating the value.

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

16 years agoUpdate checker build
Ted Kremenek [Fri, 19 Sep 2008 20:20:09 +0000 (20:20 +0000)]
Update checker build

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

16 years agoFixed logic error in BasicConstraintManager pointed out by Zhongxing Xu.
Ted Kremenek [Fri, 19 Sep 2008 18:00:36 +0000 (18:00 +0000)]
Fixed logic error in BasicConstraintManager pointed out by Zhongxing Xu.

For checking if a symbol >= value, we need to check if symbol == value || symbol
> value. When checking symbol > value and we know that symbol != value, the path
is infeasible only if value == maximum integer.

For checking if a symbol <= value, we need to check if symbol == value || symbol
< value. When checking symbol < value and we know that symbol != value, the path
is infeasible only if value == minimum integer.

Updated test case exercising this logic: we only prune paths if the values are
unsigned.

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

16 years agoFix rdar://6222856: the receiver of a message expr is an
Chris Lattner [Fri, 19 Sep 2008 17:44:00 +0000 (17:44 +0000)]
Fix rdar://6222856: the receiver of a message expr is an
arbitrary expr, not just a assign expr.  The grammar comment
was right, the code was just wrong.

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

16 years agoWhen we have a binary expression 'int operator symbol', properly rewrite this as
Ted Kremenek [Fri, 19 Sep 2008 17:31:13 +0000 (17:31 +0000)]
When we have a binary expression 'int operator symbol', properly rewrite this as
'symbol operator-reverse int'. This patch is a combination of code from
Zhongxing Xu and myself (Zhongxing noticed this bug for the cases of
relational operators).

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

16 years agoAdd an omitted case for AssumeSymInt.
Zhongxing Xu [Fri, 19 Sep 2008 06:07:59 +0000 (06:07 +0000)]
Add an omitted case for AssumeSymInt.

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

16 years agoUpdated checker build.
Ted Kremenek [Fri, 19 Sep 2008 05:14:13 +0000 (05:14 +0000)]
Updated checker build.

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

16 years agoAdded test case for PR 2600: proper use of NSError**
Ted Kremenek [Fri, 19 Sep 2008 04:56:32 +0000 (04:56 +0000)]
Added test case for PR 2600: proper use of NSError**

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

16 years agoAdd panic function "__assert_fail".
Ted Kremenek [Fri, 19 Sep 2008 02:30:47 +0000 (02:30 +0000)]
Add panic function "__assert_fail".

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

16 years agoRegister the implicit null-dereferenced object as a notable symbol.
Ted Kremenek [Thu, 18 Sep 2008 23:23:19 +0000 (23:23 +0000)]
Register the implicit null-dereferenced object as a notable symbol.

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

16 years agoImplement second part of PR 2600: NSError** parameter may be null, and should be...
Ted Kremenek [Thu, 18 Sep 2008 23:09:54 +0000 (23:09 +0000)]
Implement second part of PR 2600: NSError** parameter may be null, and should be checked before being dereferenced.

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

16 years agoUpdate Xcode project.
Ted Kremenek [Thu, 18 Sep 2008 23:08:24 +0000 (23:08 +0000)]
Update Xcode project.

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

16 years agoAnalysis option -warn-objc-nserror-methods is no longer available. (check is done...
Ted Kremenek [Thu, 18 Sep 2008 21:25:58 +0000 (21:25 +0000)]
Analysis option -warn-objc-nserror-methods is no longer available. (check is done automatically with -checker-cfref)

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

16 years agoChange implementation of NSError** coding-style check to be invoked at the end of...
Ted Kremenek [Thu, 18 Sep 2008 21:25:13 +0000 (21:25 +0000)]
Change implementation of NSError** coding-style check to be invoked at the end of the retain/release analysis.

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

16 years agoFinish pushing blocks attribute through the clang attribute machinery.
Steve Naroff [Thu, 18 Sep 2008 16:44:58 +0000 (16:44 +0000)]
Finish pushing blocks attribute through the clang attribute machinery.
Also added a couple simple tests from the "gcc.apple" test suite.

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

16 years agoAdd driver support for invoking block rewriter.
Steve Naroff [Thu, 18 Sep 2008 14:10:13 +0000 (14:10 +0000)]
Add driver support for invoking block rewriter.
Also tweaked the create function to take an explicit output file.

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

16 years agoEnable '-warn-objc-nserror-methods' by default.
Ted Kremenek [Thu, 18 Sep 2008 06:34:16 +0000 (06:34 +0000)]
Enable '-warn-objc-nserror-methods' by default.

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

16 years agoImplemented one of the checks requested in PR 2600:
Ted Kremenek [Thu, 18 Sep 2008 06:33:41 +0000 (06:33 +0000)]
Implemented one of the checks requested in PR 2600:
"Method accepting NSError** argument should have non-void return value to indicate that an error occurred."

Test case written, but the header needs to be delta-debugged reduced.  Will commit shortly.

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

16 years agoAdded CFNumberCreate test case to illustrate a 32-bit/64-bit arch issue.
Ted Kremenek [Thu, 18 Sep 2008 00:28:23 +0000 (00:28 +0000)]
Added CFNumberCreate test case to illustrate a 32-bit/64-bit arch issue.

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

16 years agoAdd path-sensitivity test case.
Ted Kremenek [Wed, 17 Sep 2008 22:24:13 +0000 (22:24 +0000)]
Add path-sensitivity test case.

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

16 years agoImprove x86 ABI compatibility.
Daniel Dunbar [Wed, 17 Sep 2008 21:22:33 +0000 (21:22 +0000)]
Improve x86 ABI compatibility.
 - Enables use of ABIArgInfo::Expand when needed. This greatly
   improves our x86 ABI compatibility.

 - As the infrastructure for target specific ABI handling isn't built
   yet, this change means ABI compatibility on other platforms is once
   again broken in a different way than before.

 - Upcoming: Figure out how to refactor ABI handling into
   targets. More documentation.

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

16 years agoPrint current function on verification failures.
Daniel Dunbar [Wed, 17 Sep 2008 21:13:22 +0000 (21:13 +0000)]
Print current function on verification failures.

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

16 years agoDrop CodeGenTypes parameter to classifyArgumentType.
Daniel Dunbar [Wed, 17 Sep 2008 20:11:04 +0000 (20:11 +0000)]
Drop CodeGenTypes parameter to classifyArgumentType.

Ensure that ABIArgInfo::Default implementation for aggregrate types
is sensible (StructRet on return and ByVal on arguments).

No functionality change.

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

16 years agoRemove BlockStmtExpr.
Steve Naroff [Wed, 17 Sep 2008 18:37:59 +0000 (18:37 +0000)]
Remove BlockStmtExpr.
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.

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

16 years agoAnother attempt to make test/Makefile return correct error code.
Daniel Dunbar [Wed, 17 Sep 2008 18:08:07 +0000 (18:08 +0000)]
Another attempt to make test/Makefile return correct error code.

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

16 years agoFix http://llvm.org/bugs/show_bug.cgi?id=2760.
Steve Naroff [Wed, 17 Sep 2008 14:05:40 +0000 (14:05 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=2760.

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

16 years agoUpdated checker build.
Ted Kremenek [Wed, 17 Sep 2008 04:22:09 +0000 (04:22 +0000)]
Updated checker build.

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

16 years agoFix comment typo.
Zhongxing Xu [Wed, 17 Sep 2008 02:35:50 +0000 (02:35 +0000)]
Fix comment typo.

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

16 years agoAdd support for ABIArgInfo::Expand
Daniel Dunbar [Wed, 17 Sep 2008 00:51:38 +0000 (00:51 +0000)]
Add support for ABIArgInfo::Expand
 - No functionality change.

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

16 years agoAdd support for rewriting blocks...
Steve Naroff [Wed, 17 Sep 2008 00:13:27 +0000 (00:13 +0000)]
Add support for rewriting blocks...

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

16 years agoIgnore XFAIL tests when checking for make failure in test/
Daniel Dunbar [Tue, 16 Sep 2008 23:43:13 +0000 (23:43 +0000)]
Ignore XFAIL tests when checking for make failure in test/

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

16 years agoFix copy-paste error in test case.
Ted Kremenek [Tue, 16 Sep 2008 23:25:28 +0000 (23:25 +0000)]
Fix copy-paste error in test case.

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

16 years agoMinor pass-sensitivity improvement:
Ted Kremenek [Tue, 16 Sep 2008 23:24:45 +0000 (23:24 +0000)]
Minor pass-sensitivity improvement:
  if we know that 'len != 0' and know that 'i == 0' then we know that
  'i < len' must evaluate to true and cannot evaluate to false

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

16 years agoUpdate Xcode project.
Ted Kremenek [Tue, 16 Sep 2008 23:21:45 +0000 (23:21 +0000)]
Update Xcode project.

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

16 years agoRemove support for BlockExprExpr. For example...
Steve Naroff [Tue, 16 Sep 2008 23:11:46 +0000 (23:11 +0000)]
Remove support for BlockExprExpr. For example...
 ^(expression) or ^(int arg1, float arg2)(expression)
...is no longer supported.
All block literals now require a compound statement.

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

16 years agoSema::ActOnBlockReturnStmt(): Need to perform the UsualUnaryConversions on the return...
Steve Naroff [Tue, 16 Sep 2008 22:25:10 +0000 (22:25 +0000)]
Sema::ActOnBlockReturnStmt(): Need to perform the UsualUnaryConversions on the return type.
Sema::CheckReturnStackAddr(): Make sure we skip over implicit casts.
Added some more test cases...

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

16 years agoProgramPoint now takes the space of two pointers instead of one. This change was
Ted Kremenek [Tue, 16 Sep 2008 18:44:52 +0000 (18:44 +0000)]
ProgramPoint now takes the space of two pointers instead of one. This change was
motivated because it became clear that the number of subclasses of ProgramPoint
would expand and we ran out of bits to represent a pointer variant. As a plus of
this change, BlockEdge program points can now be represented explicitly without
using a cache of CFGBlock* pairs in CFG.

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

16 years agoFixed an offset calculation error.
Zhongxing Xu [Tue, 16 Sep 2008 07:58:21 +0000 (07:58 +0000)]
Fixed an offset calculation error.

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

16 years agoPatch by Csaba Hruska!
Ted Kremenek [Sat, 13 Sep 2008 05:16:45 +0000 (05:16 +0000)]
Patch by Csaba Hruska!

"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."

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

16 years agoUpdated checker build.
Ted Kremenek [Sat, 13 Sep 2008 00:23:41 +0000 (00:23 +0000)]
Updated checker build.

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

16 years agoInclude links to stderr output of clang in the table of files that clang rejects.
Ted Kremenek [Fri, 12 Sep 2008 22:49:36 +0000 (22:49 +0000)]
Include links to stderr output of clang in the table of files that clang rejects.

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

16 years agoAdd ccc support for -e and -sectorder.
Daniel Dunbar [Fri, 12 Sep 2008 19:42:28 +0000 (19:42 +0000)]
Add ccc support for -e and -sectorder.
    - llvmc2, save me!

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

16 years agoRound out object size checking builtins (fprintf ones disabled as we
Daniel Dunbar [Fri, 12 Sep 2008 18:39:42 +0000 (18:39 +0000)]
Round out object size checking builtins (fprintf ones disabled as we
have no mapping to FILE*). We are also missing printf format
attributes for the printf style ones.

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

16 years agoAdd website links to testing coverage & specification references.
Daniel Dunbar [Fri, 12 Sep 2008 18:33:44 +0000 (18:33 +0000)]
Add website links to testing coverage & specification references.

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

16 years agoAdd missing spaces in path diagnostics.
Ted Kremenek [Fri, 12 Sep 2008 18:17:46 +0000 (18:17 +0000)]
Add missing spaces in path diagnostics.

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

16 years agoTeach FindSpecRefs how to link to C++ spec.
Daniel Dunbar [Fri, 12 Sep 2008 18:10:49 +0000 (18:10 +0000)]
Teach FindSpecRefs how to link to C++ spec.

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

16 years agoAdd --suppress-system-warnings (on by default, use =0 to disable)
Daniel Dunbar [Fri, 12 Sep 2008 18:10:20 +0000 (18:10 +0000)]
Add --suppress-system-warnings (on by default, use =0 to disable)
 - For investigating warnings in system headers / builtins.
 - Currently also enables the behavior that allows silent redefinition
   of types in system headers. Conceptually these are separate but I
   didn't feel it was worth two options (or changing LangOptions).

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

16 years agoUpdated checker build.
Ted Kremenek [Fri, 12 Sep 2008 04:56:58 +0000 (04:56 +0000)]
Updated checker build.

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

16 years agoGive string literals const element typesin C++, and cope with the deprecated C++...
Douglas Gregor [Fri, 12 Sep 2008 00:47:35 +0000 (00:47 +0000)]
Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character

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

16 years agoIterate on sema for :? in Objective-C:
Daniel Dunbar [Thu, 11 Sep 2008 23:12:46 +0000 (23:12 +0000)]
Iterate on sema for :? in Objective-C:
 - Follow C99 behavior of using other operand type when one of
   operands is a null pointer constant.
 - Fix overenthusiastic devolving of any Objective-C types to id:
   o If either operand has an Objective-C object type then:
     - If both operands are interfaces and either operand can be
       assigned to the other, use that type as the composite type.
     - Otherwise, if either type is id, use id as the composite type.
     - Otherwise, warn about incompatible types and use id as the
       composite type.
 - Return handling of qualified idea to separate test following
   general pointer type checking.
   o Upgraded from old code to allow devolving to id (without warning,
     which matches GCC).
 - <rdar://problem/6212771>

Add test case for issues fixed above, XFAIL though because it exposed
a new issue in property handling.

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

16 years agoAdd comments about C++ clause 3.3.2p4 that mentions that the condition declaration...
Argyrios Kyrtzidis [Thu, 11 Sep 2008 23:08:39 +0000 (23:08 +0000)]
Add comments about C++ clause 3.3.2p4 that mentions that the condition declaration should be local to an if/switch/while/for statement.

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

16 years agoEcho stderr/stdout from clang subprocess to both the stderr of ccc-analyzer and
Ted Kremenek [Thu, 11 Sep 2008 23:05:26 +0000 (23:05 +0000)]
Echo stderr/stdout from clang subprocess to both the stderr of ccc-analyzer and
to an output file. This way users can both see the output of 'clang' as well as
enable background logging of files that clang encounters problems on.

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

16 years agoBug fix: <rdar://problem/6164367>
Ted Kremenek [Thu, 11 Sep 2008 21:15:10 +0000 (21:15 +0000)]
Bug fix: <rdar://problem/6164367>

scan-build now correctly processes path prefixes that contain multiple '+'
characters or other regex control characters.

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

16 years agoAdded SSE41 pminsd, pmaxsd, roundps and a few others
Mon P Wang [Thu, 11 Sep 2008 19:22:31 +0000 (19:22 +0000)]
Added SSE41 pminsd, pmaxsd, roundps and a few others

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

16 years agoCheck if the environment variable TERM is defined before using it.
Ted Kremenek [Thu, 11 Sep 2008 18:17:51 +0000 (18:17 +0000)]
Check if the environment variable TERM is defined before using it.

This fixes: <rdar://problem/6164279> scan-build gives error when invoked without TERM variable

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

16 years agoUpdate Xcode project.
Ted Kremenek [Thu, 11 Sep 2008 18:14:22 +0000 (18:14 +0000)]
Update Xcode project.

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

16 years agoFix <rdar://problem/6210791> clang ObjC rewriter: @try / @catch block with no @finall...
Steve Naroff [Thu, 11 Sep 2008 15:29:03 +0000 (15:29 +0000)]
Fix <rdar://problem/6210791> clang ObjC rewriter: @try / @catch block with no @finally does not call objc_exception_try_exit.

Need a couple tweaks to RewriteObjCTryStmt(). Need to deal with implicit finally clauses (to make sure objc_exception_try_exit is called). Also fixed a related bug where we need to generate an implicit @catch else clause (to again make sure objc_exception_try_exit is called).

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

16 years agobool is not an extension in C++
Douglas Gregor [Thu, 11 Sep 2008 12:06:59 +0000 (12:06 +0000)]
bool is not an extension in C++

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

16 years agoMake sure to store the exception in the catch parameter.
Anders Carlsson [Thu, 11 Sep 2008 09:15:33 +0000 (09:15 +0000)]
Make sure to store the exception in the catch parameter.

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

16 years agoMake sure to emit the catch parameter as well as the catch body.
Anders Carlsson [Thu, 11 Sep 2008 08:21:54 +0000 (08:21 +0000)]
Make sure to emit the catch parameter as well as the catch body.

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

16 years agoFix stupid mistake I made in the exception handling code
Anders Carlsson [Thu, 11 Sep 2008 06:35:14 +0000 (06:35 +0000)]
Fix stupid mistake I made in the exception handling code

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

16 years agoDo implicit conversion to bool for the condition in a do-while statement.
Argyrios Kyrtzidis [Thu, 11 Sep 2008 05:16:22 +0000 (05:16 +0000)]
Do implicit conversion to bool for the condition in a do-while statement.

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

16 years agoFix do-while scoping in C++.
Argyrios Kyrtzidis [Thu, 11 Sep 2008 04:46:46 +0000 (04:46 +0000)]
Fix do-while scoping in C++.

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

16 years agoAllow array-to-pointer conversion for rvalues.
Argyrios Kyrtzidis [Thu, 11 Sep 2008 04:25:59 +0000 (04:25 +0000)]
Allow array-to-pointer conversion for rvalues.

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

16 years agoCXXConditionDeclExpr expression node is an lvalue.
Argyrios Kyrtzidis [Thu, 11 Sep 2008 04:22:26 +0000 (04:22 +0000)]
CXXConditionDeclExpr expression node is an lvalue.

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

16 years agoLangOptions.C99 should be false in C++.
Argyrios Kyrtzidis [Thu, 11 Sep 2008 04:21:06 +0000 (04:21 +0000)]
LangOptions.C99 should be false in C++.

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

16 years agoRevert r56078, getLang().C99 being true in C++ is a bug that will be fixed.
Argyrios Kyrtzidis [Thu, 11 Sep 2008 03:06:46 +0000 (03:06 +0000)]
Revert r56078, getLang().C99 being true in C++ is a bug that will be fixed.

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

16 years agoAdd support for expected-note to Clang's -verify option
Douglas Gregor [Thu, 11 Sep 2008 02:46:36 +0000 (02:46 +0000)]
Add support for expected-note to Clang's -verify option

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

16 years agoUse ABIArgInfo for decisions about function arguments (not just return
Daniel Dunbar [Thu, 11 Sep 2008 01:48:57 +0000 (01:48 +0000)]
Use ABIArgInfo for decisions about function arguments (not just return
value).
 - Added ABIArgInfo::ByVal (mostly supported) and ABIArgInfo::Expand
   (asserted out).

 - Added classifyArgumentType which currently just uses
   ABIArgInfo::Default or ByVal. This nearly matches old behavior, but
   we now set ByVal in a few situations we may have left it off before
   (on complex, for example).

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

16 years agoFix two bugs exposed by array passing assert:
Daniel Dunbar [Thu, 11 Sep 2008 00:50:25 +0000 (00:50 +0000)]
Fix two bugs exposed by array passing assert:
(1) Additional arguments to variadic methods should have default
promotions applied.

(2) Additional arguments to non-variadic methods were allowed.

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

16 years agoAdd ObjCMethodDecl::getSourceRange.
Daniel Dunbar [Thu, 11 Sep 2008 00:47:15 +0000 (00:47 +0000)]
Add ObjCMethodDecl::getSourceRange.

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

16 years agoFold Parser::ParseTag into Parser::ParseEnumSpecifier, as suggested in this post:
Argyrios Kyrtzidis [Thu, 11 Sep 2008 00:21:41 +0000 (00:21 +0000)]
Fold Parser::ParseTag into Parser::ParseEnumSpecifier, as suggested in this post:
  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-September/002721.html

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

16 years agoBug fix, apply default argument promotion in message sends for which
Daniel Dunbar [Thu, 11 Sep 2008 00:04:36 +0000 (00:04 +0000)]
Bug fix, apply default argument promotion in message sends for which
no method declaration was found.
 - This was allowing arrays to pass "by value" among other things.

Add assert in CodeGen that arguments cannot have array type.

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

16 years agoRefactor common Obj-C message send checking code into
Daniel Dunbar [Thu, 11 Sep 2008 00:01:56 +0000 (00:01 +0000)]
Refactor common Obj-C message send checking code into
CheckMessageArgumentTypes.
 - No functionality change.

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

16 years ago-getLang().C99 is true in C++ too, remove the use of the C99orCXX variable.
Argyrios Kyrtzidis [Wed, 10 Sep 2008 23:46:08 +0000 (23:46 +0000)]
-getLang().C99 is true in C++ too, remove the use of the C99orCXX variable.
-Scoping in C99 works good for C++ too, remove the C++-specific comments.

If someone thinks that the C++-specific comments are necessary for clarification, let me know and I'll put them back on.

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

16 years agoIn the 'condition.cpp' test case, make sure that condition declarations are local...
Argyrios Kyrtzidis [Wed, 10 Sep 2008 23:34:50 +0000 (23:34 +0000)]
In the 'condition.cpp' test case, make sure that condition declarations are local to the statement.

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

16 years agoAdd XFAIL test case for:
Daniel Dunbar [Wed, 10 Sep 2008 23:11:23 +0000 (23:11 +0000)]
Add XFAIL test case for:
<rdar://problem/6211479> [sema] array type invalid for Obj-C property

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

16 years agoMore semantic analysis for blocks...
Steve Naroff [Wed, 10 Sep 2008 19:17:48 +0000 (19:17 +0000)]
More semantic analysis for blocks...

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

16 years agoSema::ActOnIdentifierExpr(): Lookup block arguments.
Steve Naroff [Wed, 10 Sep 2008 18:33:00 +0000 (18:33 +0000)]
Sema::ActOnIdentifierExpr(): Lookup block arguments.

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

16 years agoAdd some C++-specific comments in the parsing methods of if/switch/while/for.
Argyrios Kyrtzidis [Wed, 10 Sep 2008 17:38:35 +0000 (17:38 +0000)]
Add some C++-specific comments in the parsing methods of if/switch/while/for.

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

16 years agoImplement ABIArgType::Coerce support.
Daniel Dunbar [Wed, 10 Sep 2008 07:04:09 +0000 (07:04 +0000)]
Implement ABIArgType::Coerce support.
  - As a test, enable basic usage for some common x86-32 cases. This
    increases our x86-32 compliance (on other targets our compliance
    will just be broken in a different way).

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

16 years agoAdd CodeGenTypes::GetFunctionType overload for getting the effective
Daniel Dunbar [Wed, 10 Sep 2008 07:00:50 +0000 (07:00 +0000)]
Add CodeGenTypes::GetFunctionType overload for getting the effective
type of a call.

Change NeXT runtime to use this instead of trying to bitcasting
internally (which doesn't respect the ABI).

Fix subtle bug, use of ConvertTypeRecursive instead of ConvertType is
bad inside GetFunctionType.

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

16 years agoMove FunctionType conversion into CGCall.cpp:
Daniel Dunbar [Wed, 10 Sep 2008 04:01:49 +0000 (04:01 +0000)]
Move FunctionType conversion into CGCall.cpp:
 - Added CodeGenTypes::GetFunctionType, taking a CGFunctionInfo.
 - Updated Obj-C runtimes to use this instead of rolling the
   llvm::FunctionType by hand.
 - Killed CodeGenTypes::{ConvertReturnType, DecodeArgumentTypes}.

Add ABIArgInfo class to encapsulate ABI decision of how to lower types
to LLVM.
 - Will move to target sometime soon.

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

16 years agoAdd ABIArgInfo class to encapsulate ABI decision of how to lower types
Daniel Dunbar [Wed, 10 Sep 2008 02:41:04 +0000 (02:41 +0000)]
Add ABIArgInfo class to encapsulate ABI decision of how to lower types
to LLVM.
 - Will move to target sometime soon.

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