| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 71899
|
| |
|
|
|
|
|
|
| |
- Skip semantic analysis of the "if" condition if it is type-dependent.
- Added the location of the "else" keyword into IfStmt, so that we can
provide it for type-checking after template instantiation.
llvm-svn: 71875
|
| |
|
|
|
|
| |
columns. Fixes <rdar://problem/6892178>
llvm-svn: 71870
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
buffer. This caused exciting nonsense like this:
$ clang t.c -fsyntax-only -UMACRO
In file included from <built-in>:104:
<command line>:1:14: warning: extra tokens at end of #undef directive [-Wextra-tokens]
#undef MACRO 1
^
//
1 diagnostic generated.
rdar://6891800
llvm-svn: 71860
|
| |
|
|
| |
llvm-svn: 71802
|
| |
|
|
| |
llvm-svn: 71800
|
| |
|
|
|
|
|
|
| |
template to the FunctionDecls from which they were instantiated. This
is a necessary first step to support instantiation of the definitions
of such functions, but by itself does essentially nothing.
llvm-svn: 71792
|
| |
|
|
|
|
| |
-faccess-control option. When we have better support for it, we can enable it by default again.
llvm-svn: 71706
|
| |
|
|
|
|
|
| |
message dispatches (and function calls later). No change in
functionality.
llvm-svn: 71683
|
| |
|
|
|
|
|
| |
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.
llvm-svn: 71534
|
| |
|
|
| |
llvm-svn: 71405
|
| |
|
|
|
|
|
| |
ns_returns_retained, but do not include the other ownership attributes
we previously had.
llvm-svn: 71308
|
| |
|
|
| |
llvm-svn: 71216
|
| |
|
|
|
|
| |
until we've had a lot more discussion.
llvm-svn: 71125
|
| |
|
|
| |
llvm-svn: 71066
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generates untraceable warnings
The "instantiated from" messages coming from the caret diagnostics system are
basically walking the macro expansion tree, emitting each level as it goes. However, it was
skipping certain leaves in the tree by skipping up the entire instantiation arm every time
it went up one spelling arm. This caused it to miss some things. For example, in this
testcase:
#define M1(x) x
#define M2 1;
void foo() {
M1(M2)
}
we now print:
/Users/sabre/Desktop/clang-unused-value-macro.c:6:2: warning: expression result unused
M1(M2)
^~~~~~
/Users/sabre/Desktop/clang-unused-value-macro.c:6:5: note: instantiated from:
M1(M2)
^~
/Users/sabre/Desktop/clang-unused-value-macro.c:3:12: note: instantiated from:
#define M2 1;
^
Previously we didn't print the last line, so we never emitted the caret pointing to the 1!
Incidentally, the spaces between the lines is really noisy, I think we should reconsider
this heuristic (which adds them when the printed code starts too close to the start of the
line).
The regression test can't use -verify, because -verify doesn't catch notes for macro
instantiation history.
llvm-svn: 71025
|
| |
|
|
| |
llvm-svn: 70990
|
| |
|
|
| |
llvm-svn: 70952
|
| |
|
|
| |
llvm-svn: 70940
|
| |
|
|
| |
llvm-svn: 70897
|
| |
|
|
|
|
|
|
|
|
|
| |
'objc_ownership_cfretain' -> 'cf_ownership_retain'
'objc_ownership_cfrelease' -> 'cf_ownership_release'
Motivation: Core Foundation objects can be used in isolation from Objective-C,
and this forces users to reason about the separate semantics of CF objects. More
Sema support pending.
llvm-svn: 70884
|
| |
|
|
|
|
| |
non-whitespace text with each expansion step. It's easier and seems to have better results.
llvm-svn: 70833
|
| |
|
|
|
|
|
|
|
| |
1) First of all, we treat _ as part of an identifier and not as
punctuation (oops).
2) Second of all, always make sure that the token that the ^ is
pointing at is fully within the "interesting" part of the range.
llvm-svn: 70831
|
| |
|
|
|
|
|
|
|
|
| |
- The diagnostic is still poor, however. Doug, can you investigate?
- Improved the test case to not depend on the file name, now it can
be extended to actually check the formatting of the diagnostics
(I'm hoping grep -A is portable here).
llvm-svn: 70807
|
| |
|
|
|
|
|
| |
printing. Also, when we only need to truncate the line at the end,
make sure there is room for the ellipsis.
llvm-svn: 70781
|
| |
|
|
| |
llvm-svn: 70681
|
| |
|
|
|
|
|
|
|
| |
fix-it hint is much worse than no fix-it hint. (Fixes PR4084).
When we need to truncate a source line to fix in the terminal, make
sure to take the width of the fix-it information into account, too.
llvm-svn: 70656
|
| |
|
|
|
|
|
|
|
|
|
|
| |
show an ellipsis where we have removed text. An example:
/Users/dgregor/Projects/llvm/tools/clang/test/Misc/message-length.c:18:120:
warning:
comparison of distinct pointer types ('int *' and 'float *')
...a_func_to_call(ip == FloatPointer, ip[ALongIndexName], ...
~~ ^ ~~~~~~~~~~~~
llvm-svn: 70655
|
| |
|
|
|
|
|
|
|
|
|
| |
word-wrapping by default in Emacs; yay!). Thanks, Daniel.
Use LLVM's System layer rather than calling isatty() directly.
Fix a thinko in printing the indentation string that was causing some
weird output.
llvm-svn: 70654
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
might be wider than we're supposed to print. In this case, we try to
select the "important" subregion of the source line, which contains
everything that we want to show (e.g., with underlining and the caret
itself) and tries to also contain some of the context.
From the fantastically long line in the test case, we get an error
message that slices down to this:
message-length.c:18:120: warning: comparison of distinct pointer types
('int *' and 'float *')
a_func_to_call(ip == FloatPointer, ip[ALongIndexName],
~~ ^ ~~~~~~~~~~~~
There are a bunch of gee-it-sounds-good heuristics in here, which seem
to do well on the various simple tests I've thrown at it. However,
we're going to need to look at a bunch more diagnostics to tweak these
heuristics.
This is the second part of <rdar://problem/6711348>. Almost there!
llvm-svn: 70597
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, put a line of whitespace between the diagnostic and the source
code/caret line when the start of the actual source code text lines up
(or nearly lines up) with the most recent line of the diagnostic. For
example, here it's okay for the last line of the diagnostic to be
(vertically) next to the source line, because there is horizontal
whitespace to separate them:
decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin
type can only take one argument
typeof(int)(a,5)<<a;
However, here is a case where we need the vertical separation (since
there is no horizontal separation):
message-length.c:10:46: warning: incompatible pointer types initializing 'void
(int, float, char, float)', expected 'int (*)(int, float, short,
float)'
int (*fp1)(int, float, short, float) = f;
This is part one of <rdar://problem/6711348>.
llvm-svn: 70578
|
| |
|
|
| |
llvm-svn: 70506
|
| |
|
|
|
|
|
|
| |
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.
llvm-svn: 70464
|
| |
|
|
|
|
|
|
|
| |
- Add an (optional) short description for BugReports for clients that want
to distinguish between long and short descriptions for bugs
- Make the bug report for VLA less obscene for Plist diagnostics by using
the short description
llvm-svn: 70415
|
| |
|
|
|
|
|
| |
lines that clang extracts from the source code so that machine parsing can
easily ignore them.
llvm-svn: 70337
|
| |
|
|
|
|
| |
to add 'CFMakeCollectable' semantics to a method.
llvm-svn: 70336
|
| |
|
|
|
|
|
| |
compilation if the user requested a PCH file but no such PCH file
exists.
llvm-svn: 70332
|
| |
|
|
| |
llvm-svn: 70330
|
| |
|
|
|
|
| |
now gotten back about 180k of the 500k we lost.
llvm-svn: 70326
|
| |
|
|
|
|
|
|
| |
which eliminates the storage for IdentifierInfo in the "uninteresting
identifier" cases. Sadly, this only brought back 7k of the 500k we
lost :(
llvm-svn: 70325
|
| |
|
|
| |
llvm-svn: 70322
|
| |
|
|
|
|
|
|
| |
line when using a PCH that were not provided when building the PCH
file. If those names were used as identifiers somewhere in the PCH
file, reject the PCH file.
llvm-svn: 70321
|
| |
|
|
|
|
|
|
|
|
| |
for identifiers to separate "interesting" from "uninteresting"
identifiers. However, to cope with compiler invocations where the
predefines buffers mismatch, we need to be able to search the complete
identifier table. Cocoa.h.pch is now about 500k larger that it used to
be :(
llvm-svn: 70320
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
PCH file and the predefines buffer used when including the PCH
file. We (explicitly) detect conflicting macro definitions (rejecting
the PCH file) and about missing macro definitions (they'll be
automatically pulled from the PCH file anyway).
We're missing some checking to make sure that new macro definitions
won't have any impact on the PCH file itself (e.g., #define'ing an
identifier that the PCH file used).
llvm-svn: 70316
|
| |
|
|
| |
llvm-svn: 70282
|
| |
|
|
|
|
|
|
|
| |
Clang version value rather than hard-coding "1.0".
Add PCH and Clang version information into the PCH file. Reject PCH
files with the wrong version information.
llvm-svn: 70264
|
| |
|
|
| |
llvm-svn: 70263
|
| |
|
|
| |
llvm-svn: 70259
|
| |
|
|
|
|
|
| |
processing to after PCH is loaded. -Eonly and -parse-noop are close to working
with PCH now but are not quite there yet.
llvm-svn: 70257
|
| |
|
|
|
|
| |
ignore a PCH file.
llvm-svn: 70251
|