- Jun 21, 2010
-
-
Fariborz Jahanian authored
particular sequence causes its definition to not be generated in the object file. (fixes radar 8071804). llvm-svn: 106424
-
Argyrios Kyrtzidis authored
llvm-svn: 106412
-
Nate Begeman authored
llvm-svn: 106407
-
- Jun 20, 2010
-
-
Argyrios Kyrtzidis authored
llvm-svn: 106404
-
Benjamin Kramer authored
llvm-svn: 106403
-
Jordy Rose authored
Adds analyzer support for idempotent and tautological binary operations such 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
-
Jordy Rose authored
Casting to void* or any other pointer-to-sizeless type (e.g. function 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
-
- Jun 19, 2010
-
-
Argyrios Kyrtzidis authored
llvm-svn: 106394
-
Argyrios Kyrtzidis authored
llvm-svn: 106393
-
Argyrios Kyrtzidis authored
llvm-svn: 106392
-
Argyrios Kyrtzidis authored
llvm-svn: 106391
-
Anton Korobeynikov authored
Patch by Anton Yartsev! llvm-svn: 106387
-
Chris Lattner authored
in PR7397 llvm-svn: 106386
-
Eli Friedman authored
conservative for static variables in templated classes. llvm-svn: 106385
-
Chris Lattner authored
-mconstructor-aliases by using a WeakVH instead of a raw pointer. llvm-svn: 106384
-
Fariborz Jahanian authored
(radar 8076356). llvm-svn: 106350
-
Jordy Rose authored
llvm-svn: 106339
-
Chris Lattner authored
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
-
Douglas Gregor authored
<rdar://problem/8108088>. llvm-svn: 106328
-
- Jun 18, 2010
-
-
Fariborz Jahanian authored
(radar 8076356) - wip. llvm-svn: 106322
-
Douglas Gregor authored
list is completely empty, from Lasse Kärkkäinen! Fixes PR7413. llvm-svn: 106320
-
Douglas Gregor authored
function to redeclarations of that function. Fixes PR7025. llvm-svn: 106317
-
Gabor Greif authored
llvm-svn: 106277
-
Charles Davis authored
Also, test that static members with default visibility in a struct have the right mangling. llvm-svn: 106276
-
Tom Care authored
- 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
-
Zhongxing Xu authored
llvm-svn: 106274
-
Alexis Hunt authored
llvm-svn: 106272
-
Ted Kremenek authored
Change two static variables into instance variables of ASTContext. This allows us to have multiple copies of ASTContext at the same time. llvm-svn: 106258
-
Douglas Gregor authored
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
-
Fariborz Jahanian authored
lvalue when performing a derived-to-base conversion. Fixes radar 7501812. Added an executable test to llvm-test suite. llvm-svn: 106247
-
Tom Care authored
M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp llvm-svn: 106245
-
- Jun 17, 2010
-
-
Fariborz Jahanian authored
Patch by Nico Weber (pr7390). llvm-svn: 106242
-
Zhanyong Wan authored
* 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
-
Fariborz Jahanian authored
an lvalue. Fixes PR7390. llvm-svn: 106235
-
Tom Care authored
- 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
-
Douglas Gregor authored
template specialization type, copy the location information but use the new type. Fixes PR7385. llvm-svn: 106224
-
Douglas Gregor authored
no overloaded operators were found in scope, mirroring what we already do for BinaryOperator. llvm-svn: 106222
-
Douglas Gregor authored
llvm-svn: 106220
-
Craig Silverstein authored
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
-
Peter Collingbourne authored
llvm-svn: 106217
-