]>
granicus.if.org Git - clang/log
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
Chris Lattner [Thu, 5 Nov 2009 21:21:32 +0000 (21:21 +0000)]
clean up integer preprocessor type definitions, patch by Ken Dyck!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 5 Nov 2009 21:10:57 +0000 (21:10 +0000)]
Make ASTContext::getIntWidth return 1 for all boolean type variations, not just for the unqualified, unaliased bool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 5 Nov 2009 21:09:23 +0000 (21:09 +0000)]
The signed/unsigned checker should not warn for value-dependent expressions, and should especially not try to evaluate them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 5 Nov 2009 20:54:04 +0000 (20:54 +0000)]
Be a little more careful when trying to extract a TypeDecl from a enum/class/struct/union specifier; in invalid code, we may also see ClassTemplateDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86171
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Thu, 5 Nov 2009 20:14:16 +0000 (20:14 +0000)]
Adding -fshort-wchar option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 5 Nov 2009 20:02:41 +0000 (20:02 +0000)]
De-FIXME a test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 5 Nov 2009 19:47:47 +0000 (19:47 +0000)]
Don't allow definitions of array variables without some size information in C++. Fixed PR5401
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 5 Nov 2009 19:13:29 +0000 (19:13 +0000)]
Enable debug info for global variables at -O1+
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 5 Nov 2009 18:47:38 +0000 (18:47 +0000)]
Adds doxygen comment for HasSideEffects method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 5 Nov 2009 18:03:03 +0000 (18:03 +0000)]
Added support for static variables which require
initialization before main. Fixes pr5396.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 5 Nov 2009 17:49:26 +0000 (17:49 +0000)]
Eliminate some false positives due to a thinko in the "'blah' is
always zero in this context" warning logic. Also, make the diagnostic
itself more precise when referring to pointer values ("NULL" vs. "zero").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86143
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 5 Nov 2009 17:44:49 +0000 (17:44 +0000)]
Add Ubuntu 9.10 libstdc++ install location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 5 Nov 2009 16:36:20 +0000 (16:36 +0000)]
When collecting types for built-in candidates, make arrays decay to pointers. Otherwise, subscripting an array leads to no candidates at all. Fixes PR5360.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 16:36:19 +0000 (16:36 +0000)]
Add clang_site_config user variable, so that extra tests (e.g., utils/C++Syntax)
can always find the main clang site config (when invoked via CMake/Makefiles, at
least).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 5 Nov 2009 15:52:31 +0000 (15:52 +0000)]
Allow the element type of arrays to be incomplete in C++.
This fixes PR5048. Also fix a bug where zero-sized arrays weren't warned about when the size was unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 5 Nov 2009 15:47:02 +0000 (15:47 +0000)]
Parse C++0x constexpr. Test case follows when this does something useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86135
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 15:28:24 +0000 (15:28 +0000)]
Don't run anything other than the compiler in these tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 5 Nov 2009 13:06:35 +0000 (13:06 +0000)]
Fixed two places where we needed to force completion of a type
(without complaining if it fails) to get proper semantics: reference
binding with a derived-to-base conversion and the enumeration of
constructors for user-defined conversions. There are probably more
cases to fix, but my prior attempt at statically ensuring that
complete-type checking always happens failed. Perhaps I'll try again.
With this change, Clang can parse include/llvm/*.h!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86129
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 5 Nov 2009 09:23:39 +0000 (09:23 +0000)]
Implement the conditional-operator part of -Wsign-compare. Turn
DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places.
Add some enumerator tests. These seem to expose some oddities in the
types we're converting C++ enumerators to; in particular, they're converting
to unsigned before int, which seems to contradict 4.5 [conv.prom] p2.
Note to self: stop baiting Doug in my commit messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86128
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Nov 2009 08:30:12 +0000 (08:30 +0000)]
Tweak wording and classifications of analyzer diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86127
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Nov 2009 08:07:41 +0000 (08:07 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 06:55:24 +0000 (06:55 +0000)]
Add EXTRA_TESTDIRS variable for specifying additional test directories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86122
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Nov 2009 06:32:02 +0000 (06:32 +0000)]
References can't be zero; omit zero check for return value adjustments
in covariant thunks that return references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Nov 2009 06:12:26 +0000 (06:12 +0000)]
Refine covariant return value adjustments for thunks when null
pointers are returned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Nov 2009 05:26:28 +0000 (05:26 +0000)]
Testcase for a recent checkin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Nov 2009 05:01:19 +0000 (05:01 +0000)]
Update.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Nov 2009 04:02:15 +0000 (04:02 +0000)]
Refine layout for indirect virtual base classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86116
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Nov 2009 03:47:55 +0000 (03:47 +0000)]
Fix 80-col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86115
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 02:42:12 +0000 (02:42 +0000)]
Replace DiagnosticClient::setLangOptions with {Begin,End}SourceFile, and clarify
invariants (diagnostics with source informations must occur between
{Begin,End}SourceFile).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 02:41:58 +0000 (02:41 +0000)]
Convert CreateAnalysisConsumer and friends to just take a const Preprocessor&, and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 02:41:44 +0000 (02:41 +0000)]
Remove unused SetPreprocessor method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Nov 2009 02:17:33 +0000 (02:17 +0000)]
AnalysisManager: Don't rely on PathDiagnosicClients flushing their diagnostics when they are destroyed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86110
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 02:11:37 +0000 (02:11 +0000)]
Remove clang-cc -html-diags option, this doesn't fit in well and we get plenty
of coverage of this from the analyzer.
If this bothers you, I can add it back in a mode where non-source diagnostics go
to stderr and only source diagnostics use -html-diags, but I don't think anyone
uses this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Nov 2009 02:09:23 +0000 (02:09 +0000)]
Acting on Daniel's nagging, remove PathDiagnosticClientFactory() and
migrate work in the destructors of PathDiagnosticClients from their
destructors to FlushReports(). The destructors now currently call
FlushReports(); this will be fixed in a subsequent patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 01:54:02 +0000 (01:54 +0000)]
Make html::{SyntaxHighlight,HighlightMacros} take a const Preprocessor.
This is conceptually correct, but adds a huge hack to HighlightMacros which is
in fact doing all sorts of mutation to the Preprocessor. See FIXME.
Chris, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 01:53:52 +0000 (01:53 +0000)]
Make LookUpIdentifierInfo const. This makes the Identifiers table mutable and is
a little fuzzy, but conceptually it's just uniquing the identifier.
Chris, please review. I debated splitting into const/non-const versions where
the const one propogated constness to the resulting IdentifierInfo*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 01:53:39 +0000 (01:53 +0000)]
StringRefize Preprocessor::getIdentifierInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86105
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 01:53:23 +0000 (01:53 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86104
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Nov 2009 01:53:12 +0000 (01:53 +0000)]
CreatePreprocessor cannot fail
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 5 Nov 2009 00:51:44 +0000 (00:51 +0000)]
When instantiating a UnaryOperator, allow the resulting expression to
still be dependent or invoke an overloaded operator. Previously, we
only supported builtin operators.
BinaryOperator/CompoundAssignOperator didn't have this issue because
we always built a CXXOperatorCallExpr node, even when name lookup
didn't find any functions to save until instantiation time. Now, that
code builds a BinaryOperator or CompoundAssignOperator rather than a
CXXOperatorCallExpr, to save some space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Nov 2009 00:42:23 +0000 (00:42 +0000)]
Modify GRExprEngine::EvalBind() to take both a "store expression" and
an "assign expression", representing the expressions where the value
binding occurs and the assignment takes place respectively. These are
largely syntactic clues for better error reporting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86084
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 5 Nov 2009 00:40:04 +0000 (00:40 +0000)]
Implement -Wsign-compare, or at least the actual comparison part of it.
Conditional operands are next.
Fixes part of rdar://problem/
7289584 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 5 Nov 2009 00:07:36 +0000 (00:07 +0000)]
Make sure to grab CVR qualifiers from the canonical type. ARGH!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Nov 2009 23:56:25 +0000 (23:56 +0000)]
Kill PreprocessorFactory, which was both morally repugnant and totally unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86076
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Nov 2009 23:41:40 +0000 (23:41 +0000)]
Turn if chain into switch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Nov 2009 23:41:27 +0000 (23:41 +0000)]
Tweak formatting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 4 Nov 2009 23:20:05 +0000 (23:20 +0000)]
When instantiating a MemberExpr, be sure to instantiate the
explicitly-specified template arguments, too!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86066
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 4 Nov 2009 23:13:52 +0000 (23:13 +0000)]
Comments, formatting. Based on patch by Brandon Pearcy!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Nov 2009 23:03:18 +0000 (23:03 +0000)]
A simple reordering of the definitions in stdint.h and
introduces no new function changes. Patch by Ken Dyck!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86062
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 4 Nov 2009 23:02:40 +0000 (23:02 +0000)]
Diagnose using a field to initialize itself. Patch by Brandon Pearcy!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 4 Nov 2009 22:49:18 +0000 (22:49 +0000)]
When starting a C++ member access expression, make sure to compute the
type of the object even when it is dependent. Specifically, this makes
sure that we get the right type for "this->", which is important when
performing name lookup into this scope to determine whether an
identifier or operator-function-id is a template name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Nov 2009 22:47:56 +0000 (22:47 +0000)]
ignore two new -W flags, patch by Tom Jablin!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 4 Nov 2009 22:24:30 +0000 (22:24 +0000)]
Give DeclarationName's operator< a more predictable, useful ordering
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86055
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Wed, 4 Nov 2009 21:52:17 +0000 (21:52 +0000)]
Fixed for running on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 4 Nov 2009 21:50:46 +0000 (21:50 +0000)]
Fix a little canonical-types issue with non-type template arguments.
Fixes PR5349.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Nov 2009 21:13:15 +0000 (21:13 +0000)]
InitializePreprocessor cannot fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86048
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Nov 2009 21:13:02 +0000 (21:13 +0000)]
Move -undef flag into PreprocessorInitOptions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86047
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 4 Nov 2009 19:13:37 +0000 (19:13 +0000)]
Add code gen for pointer-to-member function in
ctor's initializer. Fixes pr5178.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 4 Nov 2009 18:18:19 +0000 (18:18 +0000)]
Properly replace (cxxscope, template-id) annotation tokens with a
single typename annotation token when backtracing. Fixes PR5350.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86034
91177308 -0d34-0410-b5e6-
96231b3b80d8