]>
granicus.if.org Git - clang/log
Zhongxing Xu [Sun, 8 Nov 2009 13:10:34 +0000 (13:10 +0000)]
Add a checker for CWE-467: Use of sizeof() on a Pointer Type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86464
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 8 Nov 2009 11:36:54 +0000 (11:36 +0000)]
When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 8 Nov 2009 10:16:43 +0000 (10:16 +0000)]
Don't reprocess non-dependent initializers of non-dependent VarDecls. Fixes PR5426.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86460
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Sun, 8 Nov 2009 10:13:36 +0000 (10:13 +0000)]
Fix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:46:46 +0000 (09:46 +0000)]
Add clarifying parens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86457
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:46:39 +0000 (09:46 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86456
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:46:33 +0000 (09:46 +0000)]
Revert unintentional change to this file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Sun, 8 Nov 2009 07:46:34 +0000 (07:46 +0000)]
Test commit - minor terminology change to my recent patch suggested by John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86442
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 8 Nov 2009 07:12:55 +0000 (07:12 +0000)]
Always make sure we're using an unqualified type when building a
constructor name. Fixes PR5418.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 04:13:53 +0000 (04:13 +0000)]
Move a function which returns a class outside of extern C scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 04:11:32 +0000 (04:11 +0000)]
CIndex: Add temporary hack to leak memory instead of returning invalid pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86438
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 01:47:35 +0000 (01:47 +0000)]
Drop require_and_and argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 01:47:25 +0000 (01:47 +0000)]
Remove RUN: true lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 01:46:19 +0000 (01:46 +0000)]
Move test/Index input files into a sub directory (not scanned as tests).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 01:45:36 +0000 (01:45 +0000)]
Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 23:53:32 +0000 (23:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86421
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 23:53:17 +0000 (23:53 +0000)]
Tweak a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 23:16:50 +0000 (23:16 +0000)]
Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 23:06:58 +0000 (23:06 +0000)]
More LValue related code cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 22:53:10 +0000 (22:53 +0000)]
More cleanup, the code is much easier to follow now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 22:46:42 +0000 (22:46 +0000)]
Reduce nesting, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 22:43:34 +0000 (22:43 +0000)]
We only need to call SetObjCNonGC for local variables. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86410
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 22:00:15 +0000 (22:00 +0000)]
Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 7 Nov 2009 20:20:40 +0000 (20:20 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Nov 2009 18:59:51 +0000 (18:59 +0000)]
commit test update
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Nov 2009 18:59:41 +0000 (18:59 +0000)]
teach the various targets what native integer types they have.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 18:34:24 +0000 (18:34 +0000)]
Fix some build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 17:53:40 +0000 (17:53 +0000)]
Add some missing libraries for CMake as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86390
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 17:52:11 +0000 (17:52 +0000)]
Add some missing libraries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 7 Nov 2009 17:23:56 +0000 (17:23 +0000)]
Cope with calls to operator() templates. Fixes PR5419.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Nov 2009 09:22:46 +0000 (09:22 +0000)]
add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86368
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 7 Nov 2009 09:03:53 +0000 (09:03 +0000)]
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
core requirements. Fixes rdar://problem/
6389954
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 08:24:59 +0000 (08:24 +0000)]
Add bug number.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86357
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 7 Nov 2009 08:15:46 +0000 (08:15 +0000)]
Improve -Wconversion by permitting binary operations on values of the target
type (or smaller) to stay "closed" within the type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 07:26:56 +0000 (07:26 +0000)]
Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86352
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 07:18:14 +0000 (07:18 +0000)]
Cleanup, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 07:15:03 +0000 (07:15 +0000)]
Always mangle functions with special names. Fixes PR5420.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 06:07:58 +0000 (06:07 +0000)]
When instantiating a field decl, make sure to clone its attributes. With this change FileCheck no longer crashes when it's run without any arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86344
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Nov 2009 05:57:35 +0000 (05:57 +0000)]
Use SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks(). Patch by Kovarththanan Rajaratnam!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 04:58:12 +0000 (04:58 +0000)]
Switch clang-cc to use ApplyHeaderSearchOptions, and fix a thinko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 04:26:04 +0000 (04:26 +0000)]
When looking up and adding substitutions to the substitution table, make sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 04:20:50 +0000 (04:20 +0000)]
Add HeaderSearchOptions class, for packaging the information needed to
initialize HeaderSearch. Not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 04:20:39 +0000 (04:20 +0000)]
Lift InitHeaderSearch::AddEnvVarPaths logic higher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 04:20:25 +0000 (04:20 +0000)]
Formatting fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 04:20:15 +0000 (04:20 +0000)]
Rename PreprocessorInitOptions to PreprocessorOptions for consistency, and fix
filenames.
Also, move InitializePreprocessor to Utils.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 04:19:57 +0000 (04:19 +0000)]
Lift compiler builtin include path logic higher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86334
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Nov 2009 03:56:57 +0000 (03:56 +0000)]
Remove Checker::CheckType() (and instead using CheckerVisitor::PreVisitDeclStmt()), and refactor VLASizeChecker to have only one Checker subclass (not two) and to not use the node builders directly (and instead use the newer CheckerContext).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86329
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 7 Nov 2009 03:30:38 +0000 (03:30 +0000)]
Test case for -Wconversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86327
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 7 Nov 2009 03:30:10 +0000 (03:30 +0000)]
Implement -Wconversion. Off by default, in the non-gcc group. There's
significant work left to be done to reduce the false-positive rate here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 7 Nov 2009 02:08:14 +0000 (02:08 +0000)]
Add basic code completion support for ObjC messages.
Still a work in progress...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Nov 2009 01:19:37 +0000 (01:19 +0000)]
Revert r86315 and add Type::FixedWidthInt to the FIXME cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 7 Nov 2009 00:41:37 +0000 (00:41 +0000)]
MIPS linkage name confuses gdb here. Generate and test DW_AT_name here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 7 Nov 2009 00:29:05 +0000 (00:29 +0000)]
Do not assert if debug info for certain type is not generated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86315
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 7 Nov 2009 00:10:18 +0000 (00:10 +0000)]
Do not emit linkage name for global variables. It confuses gdb, because it picks up AT_MIPS_linkage_name and ignores AT_name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 7 Nov 2009 00:02:45 +0000 (00:02 +0000)]
Make sure isCopyAssignment is only true for actual copy assignment operators,
instead of all assignment operators. The mistake messes up IRGen because
it ends up assuming that the assignment operator is actually the implicit
copy assignment operator, and therefore tries to emit the RHS as an lvalue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 7 Nov 2009 00:00:49 +0000 (00:00 +0000)]
Various improvements to Clang's code-completion infrastructure:
- Introduce more code-completion string "chunk" kinds that describe
symbols, the actual text that the user is expected to type, etc.
- Make the generation of macro results optional, since it can be
slow
- Make code-completion accessible through the C API, marshalling the
code-completion results through a temporary file (ick) to maintain
process separation.
The last doesn't have tests yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 6 Nov 2009 23:27:42 +0000 (23:27 +0000)]
Refine the non-virtual this adjustment. Optimize out virtual this
adjustments of zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Nov 2009 22:59:12 +0000 (22:59 +0000)]
Since default writable attribute is 'assign', allow
specification of 'assign' (no warning to be issued),
when a continuation class makes a 'readonly' attribute
'readwrite' but also specifies the 'assign' attribute.
(this matches gcc's behavior and prevents exessive
warnings)/
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Nov 2009 22:15:27 +0000 (22:15 +0000)]
Make fragile-abi test run happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Nov 2009 21:51:50 +0000 (21:51 +0000)]
Make the VLASizeChecker implementation private, and its creation only known to GRExprEngineInternalChecks.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Nov 2009 21:48:47 +0000 (21:48 +0000)]
Fix a bogus objective-c warning with -pedantic.
(radar
7370882 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Nov 2009 20:47:51 +0000 (20:47 +0000)]
Make the implementation of DivZeroChecker private.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86288
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Nov 2009 20:47:40 +0000 (20:47 +0000)]
Prevent a code gen. crash on empty unions - pr5408.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86287
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Nov 2009 20:32:38 +0000 (20:32 +0000)]
testing: Merge PR3135.c into misc-ps-region-store.m.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86286
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Nov 2009 20:16:31 +0000 (20:16 +0000)]
Sentence-case bug type, and pull tests from region-only-test.c into misc-ps-region.store.m (removing an extra unneeded test file). Also add a bunch of FIXME comments for future enhancements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86282
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 19:19:55 +0000 (19:19 +0000)]
Simplify the debug info code, handle lvalue references and template specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Nov 2009 18:47:57 +0000 (18:47 +0000)]
This patch fixes code gen. part of pr5333 (Conversion
using elipsis conversion).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 18:45:16 +0000 (18:45 +0000)]
Handle QualifiedNameType and SubstTemplateTypeParmType types in CGDebugInfo::CreateTypeNode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 6 Nov 2009 18:42:13 +0000 (18:42 +0000)]
add test case for PR3135 which was already fixed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86273
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 18:24:04 +0000 (18:24 +0000)]
Don't assert when trying to generate debug info for vector types. This needs to be fixed eventually...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86268
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 6 Nov 2009 18:16:06 +0000 (18:16 +0000)]
Don't warn -Wsign-compare if we're in an unevaluated context, and fixed
a typo pointed out by Fariborz.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Nov 2009 18:10:47 +0000 (18:10 +0000)]
update comment, pointed out by Gabor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Nov 2009 18:01:14 +0000 (18:01 +0000)]
add some const qualifiers, patch by Kovarththanan Rajaratnam!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Nov 2009 17:38:18 +0000 (17:38 +0000)]
indirectbr seems to work! Rip out the old code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 17:01:39 +0000 (17:01 +0000)]
Instead of returning a null DIType for unhandled types, assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 6 Nov 2009 13:30:44 +0000 (13:30 +0000)]
Add a checker for CWE-466: Return of Pointer Value Outside of Expected Range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86252
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 6 Nov 2009 08:53:51 +0000 (08:53 +0000)]
compare.c also needs a target triple now, and improve some comments while we're
at it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86243
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 6 Nov 2009 08:49:08 +0000 (08:49 +0000)]
Improve the -Wsign-compare heuristics:
* If the unsigned type is smaller than the signed type, never warn, because
its value will not change when zero-extended to the larger type.
* If we're testing for (in)equality, and the unsigned value is an integer
constant whose sign bit is not set, never warn, because even though the
signed value might change, it can't affect the result of the equality.
Also make the comparison test cases much more rigorous, and have them expose
the subtle differences between C and C++ here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86242
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 6 Nov 2009 07:53:21 +0000 (07:53 +0000)]
Create a warning group "non-gcc" for diagnostics which are not enabled
by default in GCC. Users who want to emulate gcc's warning behavior
exactly should be able to use CC="clang -Wno-non-gcc"; this should help
projects to transition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Nov 2009 06:40:12 +0000 (06:40 +0000)]
add some fixit hints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86240
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Nov 2009 06:30:47 +0000 (06:30 +0000)]
Rework the fix-it hint for code like
get_origin->x
where get_origin is actually a function and the user has forgotten the
parentheses. Instead of giving a lame note for the fix-it, give a
full-fledge error, early, then build the call expression to try to
recover.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Nov 2009 05:48:00 +0000 (05:48 +0000)]
Improve recovery when we fail to parse the operand of a C++ named cast. Fixes PR5210
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Nov 2009 05:24:12 +0000 (05:24 +0000)]
Turn off -Wsign-compare warnings by default
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 04:19:02 +0000 (04:19 +0000)]
If a member variable of reference type is bound to a temporary in its member initializer it needs to be destroyed at the end of the constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86230
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 04:11:09 +0000 (04:11 +0000)]
If a member initializer create temporaries we need to destroy them. Fixes PR5077.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86225
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 03:23:06 +0000 (03:23 +0000)]
More cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 02:55:43 +0000 (02:55 +0000)]
Cleanup ctor/dtor emission.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 6 Nov 2009 02:50:19 +0000 (02:50 +0000)]
Handle ParenExprs in mangleExpression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86218
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 6 Nov 2009 02:38:24 +0000 (02:38 +0000)]
Refine the vcall for a function that is defined in a virtual base
class that is overridden in a base that isn't morally virtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86217
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Nov 2009 02:24:13 +0000 (02:24 +0000)]
static analyzer: refactor checking logic for returning the address of a stack variable or a garbage
value into their own respective subclasses of Checker (and put them in .cpp files where their
implementation details are hidden from GRExprEngine).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Nov 2009 01:14:41 +0000 (01:14 +0000)]
If we have a C-style cast, functional cast, or a static_cast to a
class type, don't perform the array-to-pointer or function-to-pointer
conversions, because we may end up binding a reference to a function
or array.
With this change, FileCheck now passes -fsyntax-only!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Nov 2009 01:02:41 +0000 (01:02 +0000)]
When we encounter a derived-to-base conversion when performing an
implicit conversion sequence, check the validity of this conversion
and then perform it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Nov 2009 00:55:14 +0000 (00:55 +0000)]
Minor cleanup of my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Nov 2009 00:44:32 +0000 (00:44 +0000)]
Minor cleanup: use BuiltinBug (which will soon be renamed) for DeferenceChecker and friends so that they always report the same bug type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Nov 2009 00:23:08 +0000 (00:23 +0000)]
This patch implements Sema for clause 13.3.3.1p4.
It has to do with vararg constructors used as conversion
functions. Code gen needs work. This is WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 6 Nov 2009 00:18:25 +0000 (00:18 +0000)]
Convert file over to checking the .ll file for codegen. Also, we
speed up this file by not doing twice the checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86205
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Fri, 6 Nov 2009 00:06:29 +0000 (00:06 +0000)]
Update clang web pages with respect to Windows
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Nov 2009 00:03:12 +0000 (00:03 +0000)]
Make sure that EnumConstantDecls always get a type, even when they have type-dependent initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 5 Nov 2009 23:46:05 +0000 (23:46 +0000)]
Strip off the /clang/tools/clang at the end of the Subversion URL, if it's there
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86195
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Thu, 5 Nov 2009 22:03:02 +0000 (22:03 +0000)]
Eliminate tabls
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86183
91177308 -0d34-0410-b5e6-
96231b3b80d8