]>
granicus.if.org Git - clang/log
Daniel Dunbar [Sat, 25 Jul 2009 15:26:08 +0000 (15:26 +0000)]
MultiTestRunner: Make sure to point at src dir, for out of tree builds.
Factor out routine for executing the script commands.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 14:46:05 +0000 (14:46 +0000)]
MultiTestRunner: Cleanup test execution & output.
- Stop writing everything to files.
- Make test output more standard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 13:19:40 +0000 (13:19 +0000)]
MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
- We don't use the former, and the latter doesn't actually work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 13:13:06 +0000 (13:13 +0000)]
MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
it currently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 12:57:15 +0000 (12:57 +0000)]
MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 12:47:38 +0000 (12:47 +0000)]
Make having no RUN line a failure.
Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure
if they are actually testing the right thing / anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 12:44:58 +0000 (12:44 +0000)]
Remove TESTDIR initialization, MultiTestRunner can find the test dirs itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 12:41:25 +0000 (12:41 +0000)]
Remove empty tests, left over from an svn revert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 12:37:21 +0000 (12:37 +0000)]
Remove this Makefile, it is unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77067
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 12:23:35 +0000 (12:23 +0000)]
MultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
cxx-using-declaration test case started exhibiting different behavior. It still
needs to be fixed, however...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 12:05:55 +0000 (12:05 +0000)]
MultiTestRunner: Always use absolute path names for tests.
Also, fix a function name I forgot to update.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 11:55:03 +0000 (11:55 +0000)]
Disable this test: cxx-using-declaration.cpp
Something strange is going on here; this test randomly started failing after
unrelated changes to TestRunner.py (even though it runs the same
script).
Argiris or Doug, can one of you investigate?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 11:27:37 +0000 (11:27 +0000)]
MultiTestRunner: Validate '&&' at the end of RUN lines.
- This is just to normalize, these will go away soon hopefully.
Added all the missing '&&'s that have crept in. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 10:14:19 +0000 (10:14 +0000)]
MultiTestRunner: Explicitly define child environment, the only variable we need
to import is the PATH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 09:53:43 +0000 (09:53 +0000)]
MultiTestRunner.py improvements.
- Tweak output directories for temp files, derive the temporary base from the
test's parent directory name, and the test name (instead of the whole path).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 09:42:24 +0000 (09:42 +0000)]
MultiTestRunner.py improvements.
- Not improved: the horribly lousy name. :)
- Suppress stderr when capturing output.
- Rewrite which() to do the right PATH search instead of being lazy and
shelling out to 'which'.
- On Windows, run scripts as batch files (via 'cmd /c ...').
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77058
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 09:01:12 +0000 (09:01 +0000)]
Change these tests to not depend as much on the name of the input.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77057
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 25 Jul 2009 04:36:53 +0000 (04:36 +0000)]
Semantic checking for main().
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77047
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 25 Jul 2009 04:35:50 +0000 (04:35 +0000)]
Flesh out the QualifierSet API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 25 Jul 2009 01:43:39 +0000 (01:43 +0000)]
Tweak svn:ignore
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 25 Jul 2009 01:40:29 +0000 (01:40 +0000)]
More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 25 Jul 2009 01:08:28 +0000 (01:08 +0000)]
Some code refactoring per Daniel's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 25 Jul 2009 00:26:00 +0000 (00:26 +0000)]
Whoops, did not mean to check this in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 25 Jul 2009 00:24:56 +0000 (00:24 +0000)]
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 24 Jul 2009 23:12:58 +0000 (23:12 +0000)]
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 24 Jul 2009 20:34:43 +0000 (20:34 +0000)]
Template instantiation for static data members that are defined out-of-line.
Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 24 Jul 2009 20:33:35 +0000 (20:33 +0000)]
Fixes broken test by accident.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77001
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 24 Jul 2009 20:28:49 +0000 (20:28 +0000)]
More Sema check for constructor's member initializer along
with type conversion to fix ir-gen crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 24 Jul 2009 20:26:31 +0000 (20:26 +0000)]
In the "use of floating point variable as loop counter" check, check
if the DeclRefExpr is a float, not just either argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 24 Jul 2009 20:03:11 +0000 (20:03 +0000)]
Have 'clang --analyze' run syntactic static analysis security checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 24 Jul 2009 19:02:52 +0000 (19:02 +0000)]
Fix 80-col violations, reflow a few comments and zap some extra
whitespace at ends of lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 24 Jul 2009 18:20:38 +0000 (18:20 +0000)]
Fix a release build warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76985
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 24 Jul 2009 17:57:02 +0000 (17:57 +0000)]
More work toward initialization of objects
in constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 24 Jul 2009 17:54:45 +0000 (17:54 +0000)]
Allow front-end 'isa' access on object's of type 'id'.
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).
Still need back-end CodeGen for ObjCIsaExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 24 Jul 2009 17:23:54 +0000 (17:23 +0000)]
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76978
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 24 Jul 2009 15:20:52 +0000 (15:20 +0000)]
Check in a half finished new constant struct builder (Obviously not used yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 24 Jul 2009 07:40:24 +0000 (07:40 +0000)]
Fix declaration of obc_enumerationMutation function, for GNU runtime.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76959
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 24 Jul 2009 06:55:42 +0000 (06:55 +0000)]
Add doxygen comments and simplify expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 24 Jul 2009 04:47:11 +0000 (04:47 +0000)]
Introduce a new variant type 'TryResult' to represent the result of
TryEvaluateBool instead of using a raw 'int'. This avoids any
confusion of how 'int' converts to bool, and makes the resultant code
easier to read.
Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the
ternary operator instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 24 Jul 2009 03:41:11 +0000 (03:41 +0000)]
Add getDecl() to CallGraph and CallGraphNode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76940
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 24 Jul 2009 03:38:27 +0000 (03:38 +0000)]
Constify methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76939
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 24 Jul 2009 03:03:21 +0000 (03:03 +0000)]
Test commit: make a little stub routine for semantic checking of main().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 24 Jul 2009 02:52:07 +0000 (02:52 +0000)]
Enable the '-warn-security-syntactic' checker option by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76933
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 24 Jul 2009 02:49:01 +0000 (02:49 +0000)]
Implement new warning for functions declared 'noreturn' when they fall off the end.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 24 Jul 2009 02:45:50 +0000 (02:45 +0000)]
Get rid of the size parameter to AppendField. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76931
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 24 Jul 2009 00:40:31 +0000 (00:40 +0000)]
Mark destructor of Checker virtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 24 Jul 2009 00:05:42 +0000 (00:05 +0000)]
We now do complete semantic checking for unions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76918
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 23 Jul 2009 23:58:15 +0000 (23:58 +0000)]
Update C++ status to reflect progress on out-of-line definitions of class template members
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76917
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 23 Jul 2009 23:49:00 +0000 (23:49 +0000)]
This patch fixes the implementations of the __has_trivial_destructor
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 23:41:22 +0000 (23:41 +0000)]
Output UTF-16 string literals independent of host byte order.
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76915
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 23 Jul 2009 23:32:59 +0000 (23:32 +0000)]
Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 23 Jul 2009 23:25:26 +0000 (23:25 +0000)]
Refactor and push the evaluation as late as possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 22:52:48 +0000 (22:52 +0000)]
Factor out map lookup for CFString constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76908
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 22:52:34 +0000 (22:52 +0000)]
Don't just store the field/bit field info one field, do it for all fields in the union.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 23 Jul 2009 22:40:11 +0000 (22:40 +0000)]
Some cleanups suggested by Daniel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 23 Jul 2009 22:29:41 +0000 (22:29 +0000)]
Implement: <rdar://problem/
6335715 > rule request: gets() buffer overflow
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76905
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 21:52:03 +0000 (21:52 +0000)]
Fix another thinko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 23 Jul 2009 21:44:18 +0000 (21:44 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76901
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 23 Jul 2009 21:34:35 +0000 (21:34 +0000)]
Refine checking and diagnostics for use of floating point variable as a counter.
This implements <rdar://problem/
6336718 > and checks for CERT secure coding
advisory FLP30-C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 21:16:33 +0000 (21:16 +0000)]
Correct a thinko in bitfield layout code. Fixes PR4611.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76898
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 20:38:28 +0000 (20:38 +0000)]
Simplify, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76897
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 17:48:59 +0000 (17:48 +0000)]
Switch the driver back to always using clang-cc by default (for C++, and
regardless of the architecture).
- This is a good default for development & testing; for example without this
any tests using 'clang' in the test suite will fail on PowerPC, since the
driver will avoid using clang.
- We don't want to actually ship something built this way, but that should be
handled via some sort of configuration file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76886
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 17:33:49 +0000 (17:33 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76885
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 17:24:40 +0000 (17:24 +0000)]
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76884
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 17:01:21 +0000 (17:01 +0000)]
Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76882
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 23 Jul 2009 16:36:45 +0000 (16:36 +0000)]
Clean up the ActOnTag action, so that there is only a single entry
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.
Removed the ActOnClassTemplate action, which is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76881
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 23 Jul 2009 15:15:06 +0000 (15:15 +0000)]
Unbreak the CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 23 Jul 2009 13:39:38 +0000 (13:39 +0000)]
Add two nodes to the call graph:
- Root is the main function or 0.
- ExternalCallingNode has edges to all external functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76876
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 23 Jul 2009 09:04:23 +0000 (09:04 +0000)]
Add template specializations to view the call graph in dot format.
- change the DenseMap used in callgraph to std::map, since DenseMap cannot
be used with mapped_iterator and friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76874
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 23 Jul 2009 08:32:25 +0000 (08:32 +0000)]
constify methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76873
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 23 Jul 2009 07:37:14 +0000 (07:37 +0000)]
Add getter methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 07:07:43 +0000 (07:07 +0000)]
Add newline at EOF.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 05:30:36 +0000 (05:30 +0000)]
Shield clang from LLVM API changes, until the dust settles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76862
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 05:06:51 +0000 (05:06 +0000)]
Fix test case, which has a control-reaches-end-of-non-void warning that was
being masked by previous bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 05:01:54 +0000 (05:01 +0000)]
Use llvm::BitVector instead of managing memory by hand.
- As it happens, this also fixes a use-of-uninitialized memory that was causing
non-deterministic test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76857
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 04:59:05 +0000 (04:59 +0000)]
Set field info for unions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76856
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 04:50:01 +0000 (04:50 +0000)]
Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 04:41:06 +0000 (04:41 +0000)]
Revert r76831, there are many Analyzer test failures on multiple platforms.
--- Reverse-merging r76831 into '.':
U include/clang/Analysis/PathSensitive/GRExprEngine.h
U lib/Analysis/GRExprEngine.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76851
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 04:00:39 +0000 (04:00 +0000)]
Handle zero width bit fields in unions correctly (by ignoring them).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 03:43:54 +0000 (03:43 +0000)]
Implement union layout support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76846
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 23 Jul 2009 03:17:50 +0000 (03:17 +0000)]
Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76845
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 23 Jul 2009 03:03:07 +0000 (03:03 +0000)]
These IRgen improvements have been done.
Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76844
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 23 Jul 2009 01:07:19 +0000 (01:07 +0000)]
Add initial implementation of checking for uses of floating point as a loop counter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 23 Jul 2009 01:06:10 +0000 (01:06 +0000)]
Add instance predicate method to match static method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 23 Jul 2009 01:05:31 +0000 (01:05 +0000)]
Add 'previsit' Checker pass for ObjCMessageExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76831
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 23 Jul 2009 01:01:38 +0000 (01:01 +0000)]
Remove a bunch of FIXME's related to ObjC type checking.
- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 23 Jul 2009 00:42:24 +0000 (00:42 +0000)]
Add constructor used to initialize base/member in
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 23 Jul 2009 00:20:25 +0000 (00:20 +0000)]
Fix case, apparently some people still build on case sensitive
filesystems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 22 Jul 2009 23:56:57 +0000 (23:56 +0000)]
Add warning for falling off the end of a function that should return a
value. This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall). I believe there should be very few false positives, though
the most interesting case would be:
int() { bar(); }
when bar does:
bar() { while (1) ; }
Here, we assume functions return, unless they are marked with the
noreturn attribute. I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.
If anyone spots other false positives, let me know!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 22 Jul 2009 23:48:44 +0000 (23:48 +0000)]
Implement support for out-of-line definitions of the class members of class
templates, e.g.,
template<typename T>
struct Outer {
struct Inner;
};
template<typename T>
struct Outer<T>::Inner {
// ...
};
Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.
There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76820
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 22 Jul 2009 23:24:42 +0000 (23:24 +0000)]
Fix test breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 22 Jul 2009 23:13:42 +0000 (23:13 +0000)]
Change Preprocessor to keep a copy of LangOptions instead of reference, like ASTContext.
Now when creating a Preprocessor we can pass it a temporary LangOptions object instead of having to remember to keep it around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76815
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 22 Jul 2009 22:56:04 +0000 (22:56 +0000)]
Improve CFG support for C++ throw expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76814
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 22 Jul 2009 22:55:09 +0000 (22:55 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76813
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 22 Jul 2009 22:35:28 +0000 (22:35 +0000)]
Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.
Educate GRExprEngine::VisitGraph() about 'PreStmt'.
Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.
Constify a bunch of arguments, which falls out of the changes to ProgramPoint.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76809
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 22 Jul 2009 22:25:00 +0000 (22:25 +0000)]
Slight code reorganization to allow instantiating post-inc/dec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 22 Jul 2009 22:05:02 +0000 (22:05 +0000)]
Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order of evaluation of their arguments to be correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 22 Jul 2009 21:52:10 +0000 (21:52 +0000)]
Use SaveAndRestore in 'clang/Analysis/Support/SaveAndRestore.h'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 22 Jul 2009 21:51:00 +0000 (21:51 +0000)]
Add AssumeDual method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 22 Jul 2009 21:46:56 +0000 (21:46 +0000)]
Migrate the path-sensitive checking of 'nonnull' arguments over to the new
'Checker' interface. An updated test case illustrates that after calling a
function with the 'nonnull' attribute we now register the fact that the passed
pointer must be non-null. This retention of information was not possible with
the previously used GRSimpleAPICheck interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76797
91177308 -0d34-0410-b5e6-
96231b3b80d8