Douglas Gregor
9091656e42
Handle C++ delete expressions when the overloaded delete operator is a
...
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.
Fixes the Sema part of PR4782.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 18:16:17 +00:00
Fariborz Jahanian
4a6a2b80c1
Fixes a nasty bug which only turned up in 32bit build of clang and
...
had to do with an initialized field when multiple type conversions
are ambiguous but must be treated as user defined conversion for
overload resolution purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 17:31:54 +00:00
Ted Kremenek
6af01047a3
Update checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83074 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 17:08:03 +00:00
Ted Kremenek
95efe0f7fb
Fix: <rdar://problem/7261075> [RegionStore] crash when handling load: '*((unsigned int *)"????")'
...
This issue was originally reported via personal email by Thomas Clement!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 16:36:48 +00:00
Douglas Gregor
e2b7eea99c
Make sure to flush raw_string_ostream, from John Thompson
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 15:13:39 +00:00
Douglas Gregor
b3496c7efd
Allow the PYTHON make variable to override the default Python when running Clang tests, from Ken Dyck.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 14:54:28 +00:00
Douglas Gregor
214904e358
Set GNUMode only for the "gnu" language standard options, from Ken Dyck!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 14:42:43 +00:00
Douglas Gregor
4831682279
Slightly improve the semantics of extern templates for member functions of class templates
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83063 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 14:38:03 +00:00
Ted Kremenek
9e17cc6abb
Fix really insidious bug in RegionStoreManager::RemoveDeadBindings()
...
identified with a false positive reported by Thomas Clement. This
involved doing another rewrite of
RegionStoreManager::RemoveDeadBindings(), which phrases the entire
problem of scanning for dead regions as a graph exploration problem.
It is more methodic than the previous implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 06:35:00 +00:00
Anders Carlsson
fcd0029a4c
Remove PR5061 workaround.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 05:36:21 +00:00
Anders Carlsson
2472bf0a17
Handle CXXMemberCallExprs that point to a static method. Fixes PR5093.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:54:11 +00:00
Anders Carlsson
7b69956387
Forgot test.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:38:56 +00:00
Ted Kremenek
a5971b3b18
Reapply most of r82939, but add a guard that FieldRegions and friends
...
are only specially treated by RegionStore::InvalidateRegion() when
their super region is also invalidated. When this isn't the case,
conjure a new symbol for a FieldRegion. Thanks to Zhongxing Xu and
Daniel Dunbar for pointing out this issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:34:03 +00:00
Douglas Gregor
69cff4e5de
Add an input file that includes all standard C++ headers
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:26:11 +00:00
Anders Carlsson
84080ec16e
Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:13:20 +00:00
Ted Kremenek
389c44c554
Revert r82939. We can only not special case FieldRegions when the super region has also been invalidated.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:12:50 +00:00
Anders Carlsson
e9d34dc7af
Improve support for member function pointers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 02:09:01 +00:00
Anders Carlsson
3016842613
Use a switch statement in VisitCastExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83038 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 01:23:39 +00:00
Anders Carlsson
e322f30486
Make hasAggregateLLVMType use positive checks.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 01:15:29 +00:00
Mike Stump
740256bafb
Fix http://llvm.org/PR5090 .
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 00:50:50 +00:00
Ted Kremenek
f8add9b5f5
Remove test case's dependency on platform headers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 23:54:40 +00:00
Fariborz Jahanian
b740023955
Define and use a helper method to call a type conversion
...
function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 23:23:40 +00:00
Fariborz Jahanian
82ad87b872
Minor API change. No change in functionality.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 22:03:07 +00:00
Douglas Gregor
d3a23b238a
Add all of the C99 complex builtins prefixed with __builtin_
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 21:45:01 +00:00
Rafael Espindola
4eda2143f1
Add -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 21:24:34 +00:00
Douglas Gregor
9a8c9a2eac
Provide a custom diagnostic when code tries to use an unknown builtin
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 21:14:19 +00:00
Fariborz Jahanian
99d6c445cc
Multiple conversions to the same type are ambiguous but for the
...
purpose of overload resolution is to be treated as a uner-defined
conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 19:06:58 +00:00
Douglas Gregor
d04b1be7d3
Make sure that out-of-line function and variable definitions are not
...
pushed into scope. Fixes PR5056.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 18:41:37 +00:00
Fariborz Jahanian
d8307b1033
Patch for AST representation for the implicit conversion to a function
...
reference/pointer. And a test case for code gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 18:35:46 +00:00
Douglas Gregor
1bffabaa35
Add __builtin_vsnprintf. Thanks to Anders Johnsen
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82998 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 18:08:57 +00:00
Douglas Gregor
9d7b35303c
Parse a C++ scope specifier followed by a "typename" annotation token as a type name within the declaration specifiers. Fixes PR5061.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 07:26:33 +00:00
Douglas Gregor
0d69653342
Properly match instantiations of member function templates to the function templates from which they were instantiated
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 06:34:35 +00:00
Douglas Gregor
3f396029a5
Don't allow the same function to enter the overload candidate set
...
multiple times. This requires to be more careful about re-adding
candidates cached from the function template definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 04:47:19 +00:00
Douglas Gregor
6a6840326e
Determinism is for wimps. <Wimper>
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 03:51:44 +00:00
Douglas Gregor
2531c2d2f1
Teach Sema::isDeclInScope to handle overload sets constructed from
...
functions that occur in multiple declaration contexts, e.g., because
some were found via using declarations. Now, isDeclInScope will build
a new overload set (when needed) containing only those declarations
that are actually in scope. This eliminates a problem found with
libstdc++'s <iostream>, where the presence of using
In the longer term, I'd like to eliminate Sema::isDeclInScope in favor
of better handling of the RedeclarationOnly flag in the name-lookup
routines. That way, name lookup only returns the entities that matter,
rather than taking the current two-pass approach of producing too many
results and then filtering our the wrong results. It's not efficient,
and I'm sure that we aren't filtering everywhere we should be.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 00:47:05 +00:00
Douglas Gregor
182ddf0e5d
Improve handling of friend function templates somewhat
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 00:08:27 +00:00
Ted Kremenek
13c200061a
Specially handle fields, elements, and ivars in
...
RegionStoreManager::InvalidateRegion() by only removing their old
binding, not conjuring a new symbol.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 22:39:07 +00:00
Ted Kremenek
bada1aad09
Add FIXME comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 20:50:04 +00:00
Ted Kremenek
8780679b02
Fix:
...
<rdar://problem/6914474> checker doesn't realize that variable might
have been assigned if a pointer to that variable was passed to another
function via a structure
The problem here was the RegionStoreManager::InvalidateRegion didn't
invalidate the bindings of invalidated regions. This required a
rewrite of this method using a worklist.
As part of this fix, changed ValueManager::getConjuredSymbolVal() to
require a 'void*' SymbolTag argument. This tag is used to
differentiate two different symbols created at the same location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 20:45:21 +00:00
Anders Carlsson
50755b0dcc
Mangle dependent name expressions. Fixes PR5063.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82915 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 20:11:34 +00:00
Anders Carlsson
e45117b945
Use mangleTemplatePrefix when we know that we're mangling a nested template name.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 19:53:49 +00:00
Anders Carlsson
6815e94199
CodeGen for try statements. (We just emit the body for now).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 18:58:34 +00:00
Cedric Venet
6bfc8b635f
CMake generate VS2008 project and CLang and LLVM compile without problem on VS2008. Remove obsolete remark
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 10:34:36 +00:00
Cedric Venet
9a7b0855a6
Handle Eli remark on mingw __declspec macro definition
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 10:09:11 +00:00
Anders Carlsson
88599176d1
Look for substitutions when mangling TypenameTypes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82885 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 01:06:07 +00:00
Anders Carlsson
0ccdf8d62c
Better template parameter type mangling.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 00:38:53 +00:00
Anders Carlsson
f514b544b2
Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82882 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 00:12:57 +00:00
Anders Carlsson
189d59cfc7
Mangle ::std::basic_string as Sb.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-26 23:14:39 +00:00
Anders Carlsson
8c0315563f
Mangle ::std::allocator as Sa.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82880 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-26 23:10:05 +00:00
Anders Carlsson
aeb85374e9
Handle substitutions in mangleTemplatePrefix.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-26 22:18:22 +00:00