| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The type of a character literal is 'int' in C, but if the user writes a
character /as/ a literal, we should assume they meant it to be a
character and not a numeric value, and thus offer %c as a correction
rather than %d.
There's a special case for multi-character literals (like 'MooV'), which
have implementation-defined value and usually cannot be printed with %c.
These still use %d as the suggestion.
In C++, the type of a character literal is 'char', and so this problem
doesn't exist.
<rdar://problem/12282316>
llvm-svn: 169398
|
|
|
|
|
|
|
| |
We tried to account for 'uint8_t' by saying that /typedefs/ of 'char'
should be corrected as %hhd rather than %c, but the condition was wrong.
llvm-svn: 169397
|
|
|
|
| |
llvm-svn: 169390
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Adds support for formatting for and while loops.
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D174
llvm-svn: 169387
|
|
|
|
|
|
|
|
|
|
| |
- Fix behavior of memoization together with optimization
- Correctly attribute the PenaltyIndentLevel (breaking directly after "(" did
not count towards the inner level)
- Recognize more tokens as assignments
Review: http://llvm-reviews.chandlerc.com/D172
llvm-svn: 169384
|
|
|
|
|
|
| |
http://llvm-reviews.chandlerc.com/D164#comment-4 : comments and a method rename
llvm-svn: 169382
|
|
|
|
|
|
|
| |
Add a diagnosting for -fsanitize=memory conflicting with other sanitizers.
Extend tests.
llvm-svn: 169380
|
|
|
|
|
|
|
| |
Our error recovery path may have made the class anonymous, and that has a pretty
disastrous impact on any attempt to parse a class body containing constructors.
llvm-svn: 169374
|
|
|
|
|
|
|
| |
the LHS of a token paste. Use "expanded from here" instead when we're not sure
it's actually a macro.
llvm-svn: 169373
|
|
|
|
| |
llvm-svn: 169367
|
|
|
|
| |
llvm-svn: 169365
|
|
|
|
|
|
|
| |
Recognize '!=' as a binary operator and assume that there are no
type definitions on the RHS of an assignment.
llvm-svn: 169363
|
|
|
|
|
|
|
|
| |
diagnostic from the emission of macro backtraces. Incidentally, we now get the
displayed source location for a diagnostic and the location for the caret from
the same place, rather than computing them separately. No functionality change.
llvm-svn: 169357
|
|
|
|
|
|
|
|
| |
prevent llvm-config.h.
Or "llvm/Support/system_error.h" could not be compiled on mingw.
llvm-svn: 169354
|
|
|
|
| |
llvm-svn: 169351
|
|
|
|
|
|
| |
copy constructors.
llvm-svn: 169350
|
|
|
|
|
|
|
| |
This will only check the direct ivar assignments in the annotated
methods.
llvm-svn: 169349
|
|
|
|
|
|
| |
adjust checkAccess. No change in functionality.
llvm-svn: 169348
|
|
|
|
|
|
|
|
| |
<declaration> tag of Comment XML and
added support for friend declaration printing.
This is wip. // rdar://12378714
llvm-svn: 169346
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the analysis improves, it will continue to add new warnings that are
potentially disruptive to existing users. From now on, such warnings will
first be introduced under the "beta" flag. Such warnings are not turned on by
default; their purpose is to allow users to test their code against future
planned changes, before those changes are actually made. After a suitable
migration period, beta warnings will be folded into the standard
-Wthread-safety.
llvm-svn: 169338
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures that even though it comes first, we pick up its .o files.
Note that if we can use this (or something similar / equivalent) on
other platforms, we could potentially remove
ReplaceOperatorsNewAndDelete from the ASan runtimes.
We should probably do something similar for TSan and MSan as well.
llvm-svn: 169328
|
|
|
|
| |
llvm-svn: 169318
|
|
|
|
|
|
|
|
|
| |
The count attribute is more accurate with regards to the size of an array. It
also obviates the upper bound attribute in the subrange. We can also better
handle an unbound array by setting the count to -1 instead of the lower bound to
1 and upper bound to 0.
llvm-svn: 169311
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the link command. This all works fine when the driver is also responsible for
adding -lstdc++ to the link command. But, if -lstdc++ (or libstdc++.a, etc) is
passed explicitly to the driver, the ASan runtime will appear in the link
command after the standard library, leading to multiple-definition errors for
the global 'operator new' and 'operator delete'. Fix this in a painfully
simple way, by inserting libclang_rt.asan.a at the start of the link command
instead of the end.
If we need to do something more clever, we can walk the link command looking
for something that resembles libstdc++ and insert libclang_rt.asan.a as late
as possible, but the simple solution works for now.
llvm-svn: 169310
|
|
|
|
|
|
|
|
| |
<declaration> tag of Comment XML and fixed a
missing block literal printout as result of the testing.
// rdar://12378714
llvm-svn: 169307
|
|
|
|
| |
llvm-svn: 169303
|
|
|
|
|
|
| |
in the triple.
llvm-svn: 169292
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Adds recovery for structural errors in clang-format.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D164
llvm-svn: 169286
|
|
|
|
|
|
|
| |
after the fixed size block header when generating
captured block variable info. // rdar://12773256
llvm-svn: 169285
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D163
llvm-svn: 169278
|
|
|
|
|
| |
Review: http://llvm-reviews.chandlerc.com/D162
llvm-svn: 169274
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D161
llvm-svn: 169272
|
|
|
|
|
|
| |
*last*, or llvm/Config/llvm-config.h could not be read in header files.
llvm-svn: 169268
|
|
|
|
| |
llvm-svn: 169262
|
|
|
|
|
|
| |
directives.
llvm-svn: 169261
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shuffling order causes the wrong one to win.
CMake didn't exhibit this problem because Clang's has *no* guards.
I'll fix this properly tomorrow when Eric and I can check both build
systems and get them to DTRT, but for now unbreak some bots by hoisting
this header.
llvm-svn: 169260
|
|
|
|
|
|
|
|
| |
Also fix header guard.
http://llvm-reviews.chandlerc.com/D159
llvm-svn: 169254
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
|
|
|
| |
llvm-svn: 169233
|
|
|
|
|
|
|
|
|
| |
PreprocessingRecord and into its own class, PPConditionalDirectiveRecord.
Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord
without needing a PreprocessingRecord.
llvm-svn: 169229
|
|
|
|
|
|
|
|
| |
regions
use the SourceLocation at the start of the respective region, instead of a unique integer.
llvm-svn: 169228
|
|
|
|
|
|
| |
compile commands of the database and expose it via the libclang API.
llvm-svn: 169226
|
|
|
|
|
|
|
|
|
| |
The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.
llvm-svn: 169219
|
|
|
|
|
|
|
|
| |
<declaration> tag of Comment XML and fixed a
missing declaration of ivars private to @implementation
as result of the testing. // rdar://12378714
llvm-svn: 169193
|
|
|
|
|
|
| |
modes. Test cases included.
llvm-svn: 169191
|
|
|
|
| |
llvm-svn: 169187
|
|
|
|
|
|
| |
after its lifetime has ended!
llvm-svn: 169170
|
|
|
|
|
|
|
|
| |
The necessity of this fix points to a problem with the design
of the addToken during the optimiation phase, which we need to address
in a much more principled way.
llvm-svn: 169151
|
|
|
|
|
|
| |
flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object.
llvm-svn: 169144
|
|
|
|
| |
llvm-svn: 169139
|