Jeffrey Yasskin
1615d45daa
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
llvm-svn: 91207
2009-12-12 05:05:38 +00:00
Eli Friedman
3950e8c411
Fix for PR4642: move work in HTMLPrinter out of the destructor.
...
llvm-svn: 91205
2009-12-12 03:36:52 +00:00
Anders Carlsson
60659a8249
Fix tyop.
...
llvm-svn: 91204
2009-12-12 02:43:16 +00:00
Mike Stump
d954638f02
Implement runtime checks for undefined behavior. WIP.
...
This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:
T a[I];
a[i] abort when i < 0 or i >= I.
Future stuff includes shifts by >= bitwidth amounts.
llvm-svn: 91198
2009-12-12 01:27:46 +00:00
Ted Kremenek
752ecd8818
We should only scan for nested blocks if we are analyzing the body of a function/method.
...
llvm-svn: 91196
2009-12-12 01:04:14 +00:00
Daniel Dunbar
3c6d1b52a0
Remove clang-cc tool, it has joined in unholy union with clang.
...
- tools/driver will be renamed to tools/clang at some point.
llvm-svn: 91195
2009-12-12 00:56:47 +00:00
Ted Kremenek
e1996c27eb
Convert the remainder of this test case over to using FileCheck.
...
llvm-svn: 91194
2009-12-12 00:42:52 +00:00
Daniel Dunbar
f075e62620
XFAIL this test on Win32 until I can take a look.
...
llvm-svn: 91193
2009-12-12 00:40:42 +00:00
Daniel Dunbar
62ee5340fc
Remove non-sensical FIXME.
...
llvm-svn: 91192
2009-12-12 00:39:58 +00:00
Ted Kremenek
eadc7c3537
Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.
...
llvm-svn: 91191
2009-12-12 00:38:18 +00:00
Anders Carlsson
e363c8e1df
Correctly diagnose [basic.stc.dynamic.allocation]p1
...
llvm-svn: 91190
2009-12-12 00:32:00 +00:00
Anders Carlsson
22f443f58c
Factor operator new declaration checking out into a separate function.
...
llvm-svn: 91189
2009-12-12 00:26:23 +00:00
Anders Carlsson
c0b2ce14cd
More work on improving the operator delete diagnostics.
...
llvm-svn: 91187
2009-12-12 00:16:02 +00:00
Douglas Gregor
9221e646f5
Switch the Emacs clang-completion-mode over to clang -cc1
...
llvm-svn: 91185
2009-12-11 23:47:56 +00:00
Daniel Dunbar
01bf3397a0
Tests: Stop looking for clang-cc, we don't need it.
...
llvm-svn: 91183
2009-12-11 23:35:10 +00:00
Anders Carlsson
f1f469554c
Fix build.
...
llvm-svn: 91182
2009-12-11 23:31:21 +00:00
Anders Carlsson
12308f41e7
Improve diagnostics for malformed delete operator function declarations.
...
llvm-svn: 91180
2009-12-11 23:23:22 +00:00
Ted Kremenek
f5303fe492
scan-build: when the build command is 'make', override the CC and CXX options by passing them as arguments to make. This fixes <rdar://problem/6790224>.
...
llvm-svn: 91179
2009-12-11 23:22:52 +00:00
Daniel Dunbar
0910cf54ac
Update a few more docs references to clang-cc.
...
llvm-svn: 91178
2009-12-11 23:17:03 +00:00
Ted Kremenek
f92b446dd4
Remove more old references to clang-cc.
...
llvm-svn: 91177
2009-12-11 23:12:52 +00:00
Daniel Dunbar
520d1e6c6b
Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.
...
llvm-svn: 91176
2009-12-11 23:04:35 +00:00
Daniel Dunbar
6c536aa0fb
Driver: Switch to using "clang" "-cc1" instead of "clang-cc".
...
llvm-svn: 91174
2009-12-11 23:00:49 +00:00
Daniel Dunbar
8c5024a63f
Tests: Change substitution to automagically use 'clang -cc1' instead of 'clang-cc'. I still plan to eventually rewrite the tests to clarify the magic (I will probably actually rewrite them to %clang so it is more obvious this is a variable that gets substituted).
...
llvm-svn: 91173
2009-12-11 22:52:03 +00:00
Ted Kremenek
5c512e63f4
Convert scan-build and ccc-analyzer over to using 'clang -cc1' instead of using 'clang-cc'.
...
llvm-svn: 91172
2009-12-11 22:44:53 +00:00
Fariborz Jahanian
ffe912c647
Patch to allow C-style cast from 'void *' to block pointer type.
...
(fixes radar 7465023).
llvm-svn: 91171
2009-12-11 22:40:48 +00:00
Daniel Dunbar
f72bdf7eed
Implement clang -cc1.
...
- I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order.
llvm-svn: 91170
2009-12-11 22:20:12 +00:00
John McCall
76d0994ffd
StmtDumper::VisitUnresolvedLookupExpr
...
llvm-svn: 91163
2009-12-11 21:50:11 +00:00
Fariborz Jahanian
8811885366
Consider conversion of objective-c pointer to 'bool' a
...
valid standard conversion to match g++'s behaviour.
llvm-svn: 91157
2009-12-11 21:23:13 +00:00
Eli Friedman
b095e15af4
Fix for PR5714: make sure globals that will be modified aren't marked const.
...
llvm-svn: 91156
2009-12-11 21:23:03 +00:00
Benjamin Kramer
4dab76a752
Switch PathDiagnostic to StringRef.
...
llvm-svn: 91155
2009-12-11 21:09:27 +00:00
Benjamin Kramer
2942150df0
Fix two typos.
...
llvm-svn: 91154
2009-12-11 20:53:46 +00:00
John McCall
d53cee1aa0
Reorganize testcase.
...
llvm-svn: 91153
2009-12-11 20:51:23 +00:00
Eli Friedman
3ace52b3a7
Fix linkage of type info and vtable for classes without linkage.
...
llvm-svn: 91152
2009-12-11 20:48:18 +00:00
Eli Friedman
75c9b97123
Make sure mangling doesn't crash in another case. Add some more tests.
...
llvm-svn: 91149
2009-12-11 20:21:38 +00:00
John McCall
2b058ef245
Don't enter a new scope for a namespace-qualified declarator unless we're
...
in a file context. In well-formed code, only happens with friend functions.
Fixes PR 5760.
llvm-svn: 91146
2009-12-11 20:04:54 +00:00
Douglas Gregor
3ef5952017
When code completion of an overload set fails, produce results for ordinary name lookup instead.
...
llvm-svn: 91141
2009-12-11 19:06:04 +00:00
Douglas Gregor
0f622367d3
Add a function's cv-qualifiers to the code-completion results as an
...
informative chunk.
llvm-svn: 91139
2009-12-11 18:44:16 +00:00
Douglas Gregor
800f2f0ff0
Teach code completion to instantiate templates when it needs to
...
llvm-svn: 91138
2009-12-11 18:28:39 +00:00
Douglas Gregor
7078839b0e
Member function templates can occur after . or ->
...
llvm-svn: 91137
2009-12-11 18:14:22 +00:00
Eli Friedman
30e94d047e
Fix for PR5706: let mangleName deal with mangling names without identifiers
...
correctly.
llvm-svn: 91136
2009-12-11 18:00:57 +00:00
Douglas Gregor
99fe2ad8c8
Tweak code-completion results by suppressing class template
...
specializations and class template partial specializations (they're
never named directly). Also, member access expressions only refer to
value declarations (fields, functions, enumerators, etc.) and
Objective-C property declarations; filter out everything else.
llvm-svn: 91133
2009-12-11 17:31:05 +00:00
Anders Carlsson
b41a5c9308
XFAIL this for now, fixing linkage bugs causes the order of globals to change. Will fix later today.
...
llvm-svn: 91130
2009-12-11 17:01:29 +00:00
Anders Carlsson
1d6ad50826
Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.
...
llvm-svn: 91129
2009-12-11 16:41:51 +00:00
Anders Carlsson
a0b98f083a
Use GetAddrOfRTTI when getting the RTTI pointer for a base class.
...
llvm-svn: 91127
2009-12-11 16:37:06 +00:00
Douglas Gregor
83c49b56fe
Class template (partial) specializations should not show up in code completion results
...
llvm-svn: 91125
2009-12-11 16:18:54 +00:00
Benjamin Kramer
b11118bd0b
Random string-related cleanups.
...
llvm-svn: 91119
2009-12-11 13:33:18 +00:00
Benjamin Kramer
8a4ad4adc1
Use StringRef.getAsInteger instead of temporary string + strtol. No intended functionality change.
...
llvm-svn: 91118
2009-12-11 13:26:32 +00:00
Eli Friedman
68396b16f6
Move the code for converting a member pointer to a bool so that it is usable
...
for logical not.
llvm-svn: 91112
2009-12-11 09:26:29 +00:00
Eli Friedman
1762cf2ad0
Fix for PR5718: implement equality comparisons for member function pointers.
...
llvm-svn: 91108
2009-12-11 07:36:43 +00:00
Ted Kremenek
f6d9cebafd
Enhance understanding of VarRegions referenced by a block whose declarations are outside the current stack frame. Fixes <rdar://problem/7462324>.
...
llvm-svn: 91107
2009-12-11 06:43:27 +00:00