| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
addresses a longstanding deficiency noted in many FIXMEs scattered
across all the targets.
This effectively moves the problem up one level, replacing eleven
FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path
through FastISel where we actually supply a DebugLoc, fixing Radar
7421831.
llvm-svn: 106243
|
| |
|
|
|
|
| |
Patch by Nico Weber (pr7390).
llvm-svn: 106242
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* refactors code in DEF_TRAVERSE_DECL() into
TraverseDeclContextHelper() to reduce code bloat and facilitate
reuse.
* makes the order of traversing a FunctionDecl (including its
subclasses)'s children more natural: before the function parameters
are visited after the function body; now they are visited after the
function type and before the function body.
* fixes a double count for function return type and arguments.
Reviewed by chandlerc and csilvers.
llvm-svn: 106236
|
| |
|
|
|
|
| |
an lvalue. Fixes PR7390.
llvm-svn: 106235
|
| |
|
|
| |
llvm-svn: 106234
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
for correctness' sake, it should be there.
llvm-svn: 106229
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the moment. The implementation of the libcall will follow.
Currently, the llvm-gcc knows when the intrinsics can be correctly handled by
the back end and only generates them in those cases, issuing libcalls directly
otherwise. That's too much coupling. The intrinsics should always be
generated and the back end decide how to handle them, be it with a libcall,
inline code, or whatever. This patch is a step in that direction.
rdar://8097623
llvm-svn: 106227
|
| |
|
|
| |
llvm-svn: 106226
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
matches what llvm-gcc and clang now produce.
llvm-svn: 106221
|
| |
|
|
| |
llvm-svn: 106220
|
| |
|
|
| |
llvm-svn: 106219
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
explicitly typed in the source, but we weren't recursing on it. One
is new <type>, the other is <type>() (eg int()).
I also fixed the initializer parsing to parse on the syntactic
initializer list, not the semantic. Usually they'll be identical, so
this won't affect much in practice, but keeps the AST as a syntax-tree
visitor.
Reviewed by chandlerc.
llvm-svn: 106218
|
| |
|
|
| |
llvm-svn: 106217
|
| |
|
|
| |
llvm-svn: 106216
|
| |
|
|
|
|
| |
warning
llvm-svn: 106215
|
| |
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 106212
|
| |
|
|
| |
llvm-svn: 106211
|
| |
|
|
|
|
|
|
| |
reference stack memory.
Also refactor the diagnostics so that we print out the kind of stack memory returned.
llvm-svn: 106210
|
| |
|
|
|
|
|
|
| |
bugs of the same
type at the same location.
llvm-svn: 106209
|
| |
|
|
|
|
|
|
|
| |
1. builtins definitions for BuiltinsARM.def
2. intrinsic validation code for SemaChecking
Unsure as to whether this is the best way to handle the make dependencies or not.
llvm-svn: 106208
|
| |
|
|
| |
llvm-svn: 106207
|
| |
|
|
| |
llvm-svn: 106206
|
| |
|
|
|
|
| |
ISD::MEMBARRIER. v7 and v7 ARM mode continue to use the custom lowering.
llvm-svn: 106204
|
| |
|
|
|
|
| |
sets the legalize action to Expand.
llvm-svn: 106203
|
| |
|
|
|
|
| |
Also removed the unused Aliases member.
llvm-svn: 106202
|
| |
|
|
| |
llvm-svn: 106201
|
| |
|
|
|
|
| |
previously would result in 'cannot yet select' errors.
llvm-svn: 106199
|
| |
|
|
|
|
|
|
|
| |
DW_OP_breg[0..31] to Dwarf.h.
Add "DW_" prefix to the llvm::dwarf::*String methods which did not
already have them in Dwarf.cpp.
llvm-svn: 106197
|
| |
|
|
|
|
| |
Fixes PR 7391.
llvm-svn: 106196
|
| |
|
|
|
|
| |
didn't indicate violated invariants but that we weren't recovering well.
llvm-svn: 106195
|
| |
|
|
|
|
|
|
|
| |
TLVP:
movl _a@TLVP, %eax
Daniel: Please review if you get a chance.
llvm-svn: 106194
|
| |
|
|
| |
llvm-svn: 106193
|
| |
|
|
| |
llvm-svn: 106192
|
| |
|
|
| |
llvm-svn: 106191
|
| |
|
|
| |
llvm-svn: 106189
|
| |
|
|
| |
llvm-svn: 106188
|
| |
|
|
| |
llvm-svn: 106187
|
| |
|
|
| |
llvm-svn: 106186
|
| |
|
|
|
|
| |
be evaluated for 'bit' operators
llvm-svn: 106185
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
global variables
by inspecting the Store bindings instead of iterating over all the global variables
in a translation unit. By looking at the store directly, we avoid cases where we cannot
directly load from the global variable, such as an array (which can result in an assertion failure)
and it also catches cases where we store stack addresses to non-scalar globals.
Also, but not iterating over all the globals in the translation unit, we maintain cache
locality, and the complexity of the checker becomes restricted to the complexity of the
analyzed function, and doesn't scale with the size of the translation unit.
This fixes PR 7383.
llvm-svn: 106184
|
| |
|
|
|
|
|
|
|
|
| |
returns the base region in
the binding key instead of the region + offset. It isn't clear if this is the best semantics, but most
clients will likely only care about simple bindings, or bindings to a particular variable. We can
refine later if necessary.
llvm-svn: 106183
|
| |
|
|
|
|
| |
BindingsHandler returns false.
llvm-svn: 106182
|
| |
|
|
| |
llvm-svn: 106179
|
| |
|
|
| |
llvm-svn: 106178
|
| |
|
|
|
|
|
|
| |
"previous token" location at the end of the class definition. This
eliminates a badly-placed error + Fix-It when the ';' following a
class definition is missing. Fixes <rdar://problem/8066414>.
llvm-svn: 106175
|