| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.
In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children.
Fixes the remainder of <rdar://problem/8104754>.
llvm-svn: 106504
|
| |
|
|
|
|
| |
order of priorotized global object initializations.
llvm-svn: 106503
|
| |
|
|
| |
llvm-svn: 106497
|
| |
|
|
|
|
|
|
| |
just skip over the body of the class or class template: it's a
semantic disaster that's likely to cause invariants to break. Fixes
part of <rdar://problem/8104754>.
llvm-svn: 106496
|
| |
|
|
|
|
|
| |
objc_category_name_xxx for each category implementation.
(fixes PR7431) patch by Nico Weber.
llvm-svn: 106492
|
| |
|
|
|
|
| |
emitted in the order in which they are seen (still radar 8076356).
llvm-svn: 106485
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=7377
Updated format string highlighting and fixits to take advantage of the new CharSourceRange class.
- Change HighlightRange to allow highlighting whitespace only in a CharSourceRange (for warnings about the ' ' (space) flag)
- Change format specifier range helper function to allow for half-open ranges (+1 to end)
- Enabled previously failing tests (FIXMEs/XFAILs removed)
- Small fixes and additions to format string test cases
M test/Sema/format-strings.c
M test/Sema/format-strings-fixit.c
M lib/Frontend/TextDiagnosticPrinter.cpp
M lib/Sema/SemaChecking.cpp
llvm-svn: 106480
|
| |
|
|
|
|
| |
reference.
llvm-svn: 106477
|
| |
|
|
|
|
| |
assuming relationships, convert the integers to the same type as the symbol, at least for now.
llvm-svn: 106458
|
| |
|
|
| |
llvm-svn: 106456
|
| |
|
|
|
|
| |
for sorting (radar 8076356).
llvm-svn: 106453
|
| |
|
|
|
|
|
| |
Test case will be checked in llvm test suite.
(finishes off radar 8076356).
llvm-svn: 106441
|
| |
|
|
|
|
|
| |
declaration have default visibility even under
-fvisibility=hidden. Fixes <rdar://problem/8109763>.
llvm-svn: 106440
|
| |
|
|
|
|
|
| |
particular sequence causes its definition to not be generated in the object file.
(fixes radar 8071804).
llvm-svn: 106424
|
| |
|
|
|
|
| |
FunctionTemplateDecl.
llvm-svn: 106412
|
| |
|
|
| |
llvm-svn: 106407
|
| |
|
|
| |
llvm-svn: 106404
|
| |
|
|
| |
llvm-svn: 106403
|
| |
|
|
|
|
| |
as "a*0" and "a+0". This is not very powerful, but does make the analyzer look a little smarter than it actually is.
llvm-svn: 106402
|
| |
|
|
|
|
| |
pointers) causes a divide-by-zero error. Simple fix: check if the pointee type size is 0 and bail out early if it is.
llvm-svn: 106401
|
| |
|
|
| |
llvm-svn: 106394
|
| |
|
|
|
|
| |
template reading from PCH.
llvm-svn: 106393
|
| |
|
|
| |
llvm-svn: 106392
|
| |
|
|
| |
llvm-svn: 106391
|
| |
|
|
|
|
| |
Patch by Anton Yartsev!
llvm-svn: 106387
|
| |
|
|
|
|
| |
conservative for static variables in templated classes.
llvm-svn: 106385
|
| |
|
|
|
|
| |
-mconstructor-aliases by using a WeakVH instead of a raw pointer.
llvm-svn: 106384
|
| |
|
|
|
|
| |
(radar 8076356).
llvm-svn: 106350
|
| |
|
|
|
|
| |
const2
llvm-svn: 106339
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to use them instead of SourceRange. CharSourceRange is just a SourceRange
plus a bool that indicates whether the range has the end character resolved
or whether the end location is the start of the end token. While most of
the compiler wants to think of ranges that have ends that are the start of
the end token, the printf diagnostic stuff wants to highlight ranges within
tokens.
This is transparent to the diagnostic stuff. To start taking advantage of
the new capabilities, you can do something like this:
Diag(..) << CharSourceRange::getCharRange(Begin,End)
llvm-svn: 106338
|
| |
|
|
|
|
| |
<rdar://problem/8108088>.
llvm-svn: 106328
|
| |
|
|
|
|
| |
(radar 8076356) - wip.
llvm-svn: 106322
|
| |
|
|
|
|
| |
list is completely empty, from Lasse Kärkkäinen! Fixes PR7413.
llvm-svn: 106320
|
| |
|
|
|
|
| |
function to redeclarations of that function. Fixes PR7025.
llvm-svn: 106317
|
| |
|
|
|
|
|
| |
Also, test that static members with default visibility in a struct have the
right mangling.
llvm-svn: 106276
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Precision toStrings shouldn't print a dot when they have no value.
- Length of char length modifier is now returned correctly.
- Added several fixit tests.
Note: fixit tests are currently broken due to a bug in HighlightRange. Marking as XFAIL for now.
M test/Sema/format-strings-fixit.c
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
llvm-svn: 106275
|
| |
|
|
| |
llvm-svn: 106274
|
| |
|
|
|
|
|
|
| |
allows us to have multiple copies
of ASTContext at the same time.
llvm-svn: 106258
|
| |
|
|
|
|
|
|
|
| |
attribute as part of the calculation. Sema::MarkDeclReferenced(), and
a few other places, want only to consider the "used" bit to determine,
e.g, whether to perform template instantiation. Fixes a linkage issue
with Boost.Serialization.
llvm-svn: 106252
|
| |
|
|
|
|
|
|
| |
lvalue when performing a derived-to-base conversion.
Fixes radar 7501812. Added an executable test to
llvm-test suite.
llvm-svn: 106247
|
| |
|
|
|
|
|
| |
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
llvm-svn: 106245
|
| |
|
|
|
|
| |
Patch by Nico Weber (pr7390).
llvm-svn: 106242
|
| |
|
|
|
|
| |
an lvalue. Fixes PR7390.
llvm-svn: 106235
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added warning for undefined behavior when using field specifier
- Added warning for undefined behavior when using length modifier
- Fixed warnings for invalid flags
- Added warning for ignored flags
- Added fixits for the above warnings
- Fixed accuracy of detecting several undefined behavior conditions
- Receive normal warnings in addition to security warnings when using %n
- Fix bug where '+' flag would remain on unsigned conversion suggestions
Summary of changes:
- Added expanded tests
- Added/expanded warnings
- Added position info to OptionalAmounts for fixits
- Extracted optional flags to a wrapper class with position info for fixits
- Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior
- Fixed conversion specifier checking to conform to C99 standard
- Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier
Note: warnings involving the ' ' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly.
M test/Sema/format-strings.c
M include/clang/Basic/DiagnosticSemaKinds.td
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
M lib/Sema/SemaChecking.cpp
llvm-svn: 106233
|
| |
|
|
|
|
|
| |
template specialization type, copy the location information but use
the new type. Fixes PR7385.
llvm-svn: 106224
|
| |
|
|
|
|
|
| |
no overloaded operators were found in scope, mirroring what we already
do for BinaryOperator.
llvm-svn: 106222
|
| |
|
|
| |
llvm-svn: 106220
|
| |
|
|
| |
llvm-svn: 106216
|
| |
|
|
|
|
| |
against the parser reading too few tokens.
llvm-svn: 106214
|
| |
|
|
|
|
|
|
|
|
|
| |
In a line like:
(;
the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren).
This may affect later parsing and result in bad recovery for parsing errors.
llvm-svn: 106213
|