| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 173378
|
| |
|
|
|
|
| |
commented on and approved by Richard Smith.
llvm-svn: 173377
|
| |
|
|
|
|
| |
to pass floating point arguments to be passed in integer registers.
llvm-svn: 173375
|
| |
|
|
| |
llvm-svn: 173371
|
| |
|
|
| |
llvm-svn: 173370
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a missing piece for C99 conformance.
This patch handles UCNs by adding a '\\' case to LexTokenInternal and
LexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.
If the UCN is not syntactically well-formed, we fall back to the old
treatment: a backslash followed by an identifier beginning with 'u' (or 'U').
Because the spelling of an identifier with UCNs still has the UCN in it, we
need to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.
Of course, valid code that does *not* use UCNs will see only a very minimal
performance hit (checks after each identifier for non-ASCII characters,
checks when converting raw_identifiers to identifiers that they do not
contain UCNs, and checks when getting the spelling of an identifier that it
does not contain a UCN).
This patch also adds basic support for actual UTF-8 in the source. This is
treated almost exactly the same as UCNs except that we consider stray
Unicode characters to be mistakes and offer a fixit to remove them.
llvm-svn: 173369
|
| |
|
|
| |
llvm-svn: 173368
|
| |
|
|
|
|
|
| |
for an unsupported architecture.
rdar://13063988
llvm-svn: 173364
|
| |
|
|
|
|
|
| |
to delete result files for only those commands that fail.
Part of rdar://12984531
llvm-svn: 173361
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.
Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td.
This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute.
When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and
name, then passed to Attr that will use the index to print itself.
Thanks to Richard Smith for the idea and review.
llvm-svn: 173358
|
| |
|
|
|
|
|
| |
raw_fd_ostream(fd, ...) instead.
FIXME: PathV2::unique_file() is assumed to open the file with binary mode on win32.
llvm-svn: 173330
|
| |
|
|
|
|
| |
overloaded binary operators.
llvm-svn: 173315
|
| |
|
|
|
|
| |
functionality change!
llvm-svn: 173314
|
| |
|
|
|
|
|
| |
type of the string literal implicitly used for a raw user-defined literal call.
No test; this has no semantic impact.
llvm-svn: 173309
|
| |
|
|
| |
llvm-svn: 173303
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The global module index is a "global" index for all of the module
files within a particular subdirectory in the module cache, which
keeps track of all of the "interesting" identifiers and selectors
known in each of the module files. One can perform a fast lookup in
the index to determine which module files will have more information
about entities with a particular name/selector. This information can
help eliminate redundant lookups into module files (a serious
performance problem) and help with creating auto-import/auto-include
Fix-Its.
The global module index is created or updated at the end of a
translation unit that has triggered a (re)build of a module by
scraping all of the .pcm files out of the module cache subdirectory,
so it catches everything. As with module rebuilds, we use the file
system's atomicity to synchronize.
llvm-svn: 173301
|
| |
|
|
| |
llvm-svn: 173292
|
| |
|
|
|
|
|
|
|
| |
This isn't likely a full solution, but it catches the common cases
and can be refined over time.
Fixes <rdar://problem/11634353>.
llvm-svn: 173291
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before:
if (aaaaaaaaaa(
aaaaaaaaaa)) {}
After:
if (aaaaaaaaaa(
aaaaaaaaaa)) {}
llvm-svn: 173290
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
GCC implements -Wvla as "warn on every VLA" (this is useful to find every VLA,
for example, if they are forbidden by coding guidelines). Currently Clang
implements -Wvla as "warn on VLA when it is an extension".
The attached patch makes our behavior match GCC. The existing vla extwarn is
moved under -Wvla-extension and is still included into -Wgnu.
This fixes PR5953.
llvm-svn: 173286
|
| |
|
|
|
|
|
|
|
| |
identifiers into two parts: the part that involves dealing with the
key (which can be re-used) and the ASTReader-specific part that
creates the IdentifierInfos. While I'm at it, StringRef'ify this code,
which was using pair<const char*, unsigned>. No functionality change.
llvm-svn: 173283
|
| |
|
|
|
|
|
|
|
|
|
|
| |
bogus with a PCH
that redefined a macro without undef'ing it first.
Proper reconstruction of the macro info history from modules will properly fix this in subsequent commits.
rdar://13016031
llvm-svn: 173281
|
| |
|
|
| |
llvm-svn: 173277
|
| |
|
|
| |
llvm-svn: 173274
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int aaaa = aaaaa().aaaaa() // force break
.aaaaa();
After:
int aaaa = aaaaa().aaaaa() // force break
.aaaaa();
The other indent is just wrong and confusing.
llvm-svn: 173273
|
| |
|
|
| |
llvm-svn: 173272
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
bool aaaa = aaaaaaaaaaa(
aaaaaaaaaaaaaaaaa);
After:
bool aaaa = aaaaaaaaaaa(
aaaaaaaaaaaaaaaaa);
The other indentation was a nice attempt but doesn't work in many cases.
Not sure what the right long term solution is as the "After: " is still
not nice. We either need to figure out what to do in the cases where it
"doesn't work" or come up with a third solution, e.g. falling back to:
bool aaaa =
aaaaaaaaaaa(
aaaaaaaaaaaaaaaaa);
which should always work and nicely highlight the structure.
llvm-svn: 173268
|
| |
|
|
|
|
|
| |
Now correctly formats:
#define A (1)
llvm-svn: 173264
|
| |
|
|
|
|
|
|
|
|
| |
Layouting would prevent breaking before + in
a[b + c] = d;
Regression detected by code review.
Also fixes an invalid-read found by the valgrind bot.
llvm-svn: 173262
|
| |
|
|
|
|
| |
Before: for (int & a : Values) {}
After: for (int &a : Values) {}
llvm-svn: 173259
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having seen more cases, this actually was not a good thing to do in the
first place. We can still improve on what we do now, but breaking after
the "=" is good in many cases.
Before:
aaaaaaaaaaaaa = aa->aaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaa));
After:
aaaaaaaaaaaaa =
aa->aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaa));
llvm-svn: 173257
|
| |
|
|
|
|
|
|
|
|
| |
Before: if (int * a = &b) ...
After: if (int *a = &b) ...
Also changed all the existing tests to test the expressions in question
both in a declaration and in an expression context.
llvm-svn: 173256
|
| |
|
|
|
|
|
|
| |
operations (as opposed to storage only half/fp16).
Also add some semantic checks for OpenCL half types.
llvm-svn: 173254
|
| |
|
|
|
|
|
|
|
| |
We will need a more principled solution, but we should not leave this
unfixed until we come up with one.
Before: void f() { int * a; }
After: void f() { int *a; }
llvm-svn: 173252
|
| |
|
|
| |
llvm-svn: 173250
|
| |
|
|
|
| |
Also: expletive deleted.
llvm-svn: 173247
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only affects styles where BinPackParameters is false.
With AllowAllParametersOnNextLine:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaa, aaaaaaaaaa, aaaaaaaaaa, aaaaaaaaaaa, aaaaaaaaaaa);
Without it:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaa,
aaaaaaaaaa,
aaaaaaaaaa,
aaaaaaaaaaa,
aaaaaaaaaaa);
llvm-svn: 173246
|
| |
|
|
|
|
|
|
|
|
|
| |
This gives us the ability to guess better defaults for whether a *
between identifiers is a pointer dereference or binary operator.
Now correctly formats:
void f(a *b);
void f() { f(a * b); }
llvm-svn: 173243
|
| |
|
|
|
|
|
|
|
| |
attributes.
Collections of attributes are handled via the AttributeSet class now. This
finally frees us up to make significant changes to how attributes are structured.
llvm-svn: 173229
|
| |
|
|
|
|
|
| |
nulls instead of limiting itself to the language-defined "null pointer
constant".
llvm-svn: 173227
|
| |
|
|
| |
llvm-svn: 173215
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix a typo, s/BeginSourceAction/BeginSourceFile/, so that the documentation
for FrontendAction::BeginSourceFileAction links correctly to BeginSourceFile;
* Add some basic \file documentation for FrontendAction.h;
* More use of "\brief" instead of repeating the name of the entity being
documented;
* Stop using Doxygen-style "///" comments in FrontendAction.cpp, as they were
polluting the documentation for BeginSourceFile;
* Drop incorrect "\see" markup that broke Doxygen's formatting;
* Other minor documentation fixes.
llvm-svn: 173213
|
| |
|
|
|
|
| |
when adding a single attribute to the function.
llvm-svn: 173211
|
| |
|
|
|
|
| |
from Saleem Abdulrasool!
llvm-svn: 173208
|
| |
|
|
| |
llvm-svn: 173188
|
| |
|
|
|
|
| |
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.
llvm-svn: 173186
|
| |
|
|
|
|
| |
in my last patch, suggested by Argyrios.
llvm-svn: 173182
|
| |
|
|
|
|
|
| |
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616
llvm-svn: 173179
|
| |
|
|
|
|
| |
supported.
llvm-svn: 173177
|
| |
|
|
|
|
|
| |
would expect, and clean up the return/break inconsistencies. Thanks,
Sebastian!
llvm-svn: 173171
|