Zhongxing Xu
86b1e01c13
Add checker for CWE-469: Use of Pointer Subtraction to Determine Size. This
...
checker does not build sink nodes. Because svaluator computes an unknown value
for the subtraction now.
llvm-svn: 86517
2009-11-09 05:34:10 +00:00
Eli Friedman
cc522d9ab3
Rearrange function to avoid recursive use-after-free.
...
llvm-svn: 86516
2009-11-09 05:07:37 +00:00
Eli Friedman
a72bf0fae8
Explicitly note that pre-inc/dec lvalues are not supported yet, so that it
...
doesn't crash. (Such expressions are valid in C++, but not in C.)
llvm-svn: 86513
2009-11-09 04:20:47 +00:00
Zhongxing Xu
1521c85c04
Remove dead code.
...
llvm-svn: 86512
2009-11-09 04:19:30 +00:00
Chris Lattner
e6e64be1d9
fix thinko
...
llvm-svn: 86509
2009-11-09 04:04:07 +00:00
Eli Friedman
cb29876839
Add hack to make the given testcase work. As far as I can tell, this change is
...
reasonably safe, but it doesn't seem like the right solution.
llvm-svn: 86508
2009-11-09 03:59:26 +00:00
Chris Lattner
e5eb726e2e
mention that clang defaults to C99 mode, PR5388
...
llvm-svn: 86507
2009-11-09 03:21:02 +00:00
Chris Lattner
b8ca95481f
remove a mostly obsolete "word of warning"
...
llvm-svn: 86506
2009-11-09 03:18:18 +00:00
Zhongxing Xu
0f92ec6ebd
Add a test case for CWE-467, and simplify the wording of the warning.
...
llvm-svn: 86504
2009-11-09 02:28:12 +00:00
Daniel Dunbar
11c08c8e5b
Rename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer match what it is semantically used for.
...
Also, fix a major bug where fields from a C++ struct might be dropped -- the expand action doesn't handle them correctly yet.
llvm-svn: 86502
2009-11-09 01:33:53 +00:00
Eli Friedman
96c0a3e6c2
Remove a useless variable that got left behind.
...
llvm-svn: 86501
2009-11-09 01:11:03 +00:00
Eli Friedman
d7686ef31c
Unify the codepaths used to verify base and member initializers for explicitly
...
and implicitly defined constructors. This has a number of benefits:
1. Less code.
2. Explicit and implicit constructors get the same diagnostics.
3. The AST explicitly contains constructor calls from implicit default
constructors. This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.
llvm-svn: 86500
2009-11-09 01:05:47 +00:00
Eli Friedman
fd8d4e1383
Fix use-after-free bug.
...
llvm-svn: 86485
2009-11-08 22:15:39 +00:00
Benjamin Kramer
489232c466
Update CMake file.
...
llvm-svn: 86479
2009-11-08 18:30:42 +00:00
Sebastian Redl
14236c8e82
Special-case default argument expression in instantiation. This should fix PR4301. Doug, please double-check my assumptions. Read the PR for more details.
...
llvm-svn: 86465
2009-11-08 13:56:19 +00:00
Zhongxing Xu
b0a05f7ca1
Add a checker for CWE-467: Use of sizeof() on a Pointer Type.
...
llvm-svn: 86464
2009-11-08 13:10:34 +00:00
Sebastian Redl
afb8be743d
When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430.
...
llvm-svn: 86461
2009-11-08 11:36:54 +00:00
Sebastian Redl
3752e1dbb4
Don't reprocess non-dependent initializers of non-dependent VarDecls. Fixes PR5426.
...
llvm-svn: 86460
2009-11-08 10:16:43 +00:00
Edward O'Callaghan
932c32043a
Fix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.
...
llvm-svn: 86459
2009-11-08 10:13:36 +00:00
Daniel Dunbar
7e215ea165
Add clarifying parens.
...
llvm-svn: 86457
2009-11-08 09:46:46 +00:00
Daniel Dunbar
3b339a3aa3
Simplify.
...
llvm-svn: 86456
2009-11-08 09:46:39 +00:00
Daniel Dunbar
bd33c94d6f
Revert unintentional change to this file.
...
llvm-svn: 86455
2009-11-08 09:46:33 +00:00
Alexis Hunt
6f3de50ca7
Test commit - minor terminology change to my recent patch suggested by John McCall
...
llvm-svn: 86442
2009-11-08 07:46:34 +00:00
Douglas Gregor
4100db6174
Always make sure we're using an unqualified type when building a
...
constructor name. Fixes PR5418.
llvm-svn: 86441
2009-11-08 07:12:55 +00:00
Daniel Dunbar
2679a884d7
Move a function which returns a class outside of extern C scope.
...
llvm-svn: 86439
2009-11-08 04:13:53 +00:00
Daniel Dunbar
a797946755
CIndex: Add temporary hack to leak memory instead of returning invalid pointers.
...
llvm-svn: 86438
2009-11-08 04:11:32 +00:00
Daniel Dunbar
d90e0a113e
Drop require_and_and argument.
...
llvm-svn: 86433
2009-11-08 01:47:35 +00:00
Daniel Dunbar
34546ce43d
Remove RUN: true lines.
...
llvm-svn: 86432
2009-11-08 01:47:25 +00:00
Daniel Dunbar
6eb1201c90
Move test/Index input files into a sub directory (not scanned as tests).
...
llvm-svn: 86431
2009-11-08 01:46:19 +00:00
Daniel Dunbar
8b57697954
Eliminate &&s in tests.
...
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Daniel Dunbar
066967052c
Rework site config for cmake to be generated at configure time, and only pass
...
the 'build_config' value in at runtime using the new lit runtime user parameter
feature.
This simplifies things and drops a dependency on 'sed', FWIW.
llvm-svn: 86421
2009-11-07 23:53:32 +00:00
Daniel Dunbar
8466a0d944
Tweak a FIXME.
...
llvm-svn: 86420
2009-11-07 23:53:17 +00:00
Anders Carlsson
5bbdc9f857
Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.
...
llvm-svn: 86414
2009-11-07 23:16:50 +00:00
Anders Carlsson
ea4c30b39a
More LValue related code cleanup.
...
llvm-svn: 86413
2009-11-07 23:06:58 +00:00
Anders Carlsson
2ff6395ddc
More cleanup, the code is much easier to follow now.
...
llvm-svn: 86412
2009-11-07 22:53:10 +00:00
Anders Carlsson
6eee97276b
Reduce nesting, no functionality change.
...
llvm-svn: 86411
2009-11-07 22:46:42 +00:00
Anders Carlsson
03f83e58f7
We only need to call SetObjCNonGC for local variables. No functionality change.
...
llvm-svn: 86410
2009-11-07 22:43:34 +00:00
Anders Carlsson
509850ebec
Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.
...
llvm-svn: 86407
2009-11-07 22:00:15 +00:00
Fariborz Jahanian
d7aa9d8a63
Patch to gives an error that at least points users in the direction of the error, rather
...
than an error about incompatible types. Patch by Sean Hunt.
llvm-svn: 86402
2009-11-07 20:20:40 +00:00
Chris Lattner
3f5124815d
commit test update
...
llvm-svn: 86396
2009-11-07 18:59:51 +00:00
Chris Lattner
5c67237ff6
teach the various targets what native integer types they have.
...
llvm-svn: 86395
2009-11-07 18:59:41 +00:00
Daniel Dunbar
4ba3b297e6
Fix some build warnings.
...
llvm-svn: 86393
2009-11-07 18:34:24 +00:00
Daniel Dunbar
5a3b974446
Add some missing libraries for CMake as well.
...
llvm-svn: 86390
2009-11-07 17:53:40 +00:00
Daniel Dunbar
05aaf77d6c
Add some missing libraries.
...
llvm-svn: 86389
2009-11-07 17:52:11 +00:00
Douglas Gregor
358e7745ed
Cope with calls to operator() templates. Fixes PR5419.
...
llvm-svn: 86387
2009-11-07 17:23:56 +00:00
Chris Lattner
15275e55ce
add missing #include
...
llvm-svn: 86368
2009-11-07 09:22:46 +00:00
John McCall
b61e9d03c1
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
...
core requirements. Fixes rdar://problem/6389954
llvm-svn: 86364
2009-11-07 09:03:53 +00:00
Anders Carlsson
d3569efb5a
Add bug number.
...
llvm-svn: 86357
2009-11-07 08:24:59 +00:00
John McCall
b397956338
Improve -Wconversion by permitting binary operations on values of the target
...
type (or smaller) to stay "closed" within the type.
llvm-svn: 86356
2009-11-07 08:15:46 +00:00
Anders Carlsson
f5dc6fa252
Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.
...
llvm-svn: 86352
2009-11-07 07:26:56 +00:00