|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| 
| | diagnosing this code as an error when it should, so I've filed
http://llvm.org/bugs/show_bug.cgi?id=7325. 
llvm-svn: 105683 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | - Refactored LengthModifier to be a class.
- Added toString methods in all member classes of FormatSpecifier.
- FixIt suggestions keep user specified flags unless incorrect.
Limitations:
- The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation.
A    test/Sema/format-strings-fixit.c
M    include/clang/Analysis/Analyses/PrintfFormatString.h
M    lib/Analysis/PrintfFormatString.cpp
M    lib/Sema/SemaChecking.cpp
llvm-svn: 105680 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | being a subsequence of another standard conversion sequence. Instead
of requiring exact type equality for the second conversion step,
require type *similarity*, which is type equality with cv-qualifiers
removed at all levels. This appears to match the behavior of EDG and
VC++ (albeit not GCC), and feels more intuitive. Big thanks to John
for the line of reasoning that supports this change: since
cv-qualifiers are orthogonal to the second conversion step, we should
ignore them in the type comparison.
llvm-svn: 105678 | 
| | 
| 
| 
| | llvm-svn: 105676 | 
| | 
| 
| 
| | llvm-svn: 105673 | 
| | 
| 
| 
| | llvm-svn: 105672 | 
| | 
| 
| 
| | llvm-svn: 105671 | 
| | 
| 
| 
| | llvm-svn: 105670 | 
| | 
| 
| 
| 
| 
| | Test out some basic constant-checking.
llvm-svn: 105667 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | structures wouldn't have
their associated memory destroyed when using a BumpPtrAllocator.  These objects internally use
a DenseMap.
llvm-svn: 105659 | 
| | 
| 
| 
| 
| 
| 
| 
| | wouldn't have their
associated SmallVectors get deallocated.
llvm-svn: 105658 | 
| | 
| 
| 
| | llvm-svn: 105657 | 
| | 
| 
| 
| 
| 
| | __StaticInit section.
llvm-svn: 105650 | 
| | 
| 
| 
| 
| 
| | global init or destruction functions.
llvm-svn: 105649 | 
| | 
| 
| 
| 
| 
| | UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead.
llvm-svn: 105648 | 
| | 
| 
| 
| | llvm-svn: 105647 | 
| | 
| 
| 
| | llvm-svn: 105646 | 
| | 
| 
| 
| 
| 
| 
| | build a new declaration for that tag type that will be visible for
future lookups of that tag.
llvm-svn: 105643 | 
| | 
| 
| 
| 
| 
| 
| | determining whether one overload candidate is better than
another. Fixes PR7319.
llvm-svn: 105642 | 
| | 
| 
| 
| 
| 
| | entry previously constructed via copy constructor.
llvm-svn: 105641 | 
| | 
| 
| 
| | llvm-svn: 105639 | 
| | 
| 
| 
| 
| 
| | scattered throughout the project Makefiles.
llvm-svn: 105638 | 
| | 
| 
| 
| 
| 
| | - This eliminates most dependencies on how Clang is installed relative to LLVM.
llvm-svn: 105637 | 
| | 
| 
| 
| 
| 
| | warnings, from Troy Straszheim! Fixes PR6163.
llvm-svn: 105631 | 
| | 
| 
| 
| | llvm-svn: 105628 | 
| | 
| 
| 
| 
| 
| | copy-in of c++ class objects into blocks.
llvm-svn: 105622 | 
| | 
| 
| 
| 
| 
| | pointer. Original patch by Troy D. Straszheim; fixes PR7283.
llvm-svn: 105621 | 
| | 
| 
| 
| 
| 
| | need to go past the highest offset that's known to contain an empty base subobject.
llvm-svn: 105611 | 
| | 
| 
| 
| | llvm-svn: 105608 | 
| | 
| 
| 
| | llvm-svn: 105606 | 
| | 
| 
| 
| 
| 
| | the function call is left where the local variable is declared.
llvm-svn: 105602 | 
| | 
| 
| 
| 
| 
| | make it through codegen to the .s file
llvm-svn: 105599 | 
| | 
| 
| 
| | llvm-svn: 105597 | 
| | 
| 
| 
| | llvm-svn: 105595 | 
| | 
| 
| 
| 
| 
| | appropriate to check them when compiling or other archs.  Fixes a problem where compiling for NEON would use x86 sema rules.
llvm-svn: 105593 | 
| | 
| 
| 
| 
| 
| 
| 
| | ARM.
Fixes PR7310.
llvm-svn: 105592 | 
| | 
| 
| 
| | llvm-svn: 105590 | 
| | 
| 
| 
| 
| 
| | shufflevector instruction.  This means it can now be used for vector truncation and concatenation.  This will be used for the ARM NEON implementation.
llvm-svn: 105589 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | - We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').
It is now possible to do something like:
  $ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
  $ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
  $ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.
*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.
llvm-svn: 105584 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | - This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.
For example, 'llvm-as' is:
  $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
  $ clang -cc1 -emit-llvm    FOO.bc -o -
and 'opt' is, e.g.:
  $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
  $ clang -cc1 -S -o - FOO.ll
The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).
llvm-svn: 105583 | 
| | 
| 
| 
| 
| 
| | - These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.
llvm-svn: 105582 | 
| | 
| 
| 
| | llvm-svn: 105581 | 
| | 
| 
| 
| | llvm-svn: 105580 | 
| | 
| 
| 
| 
| 
| | to parallel what is done for AST inputs.
llvm-svn: 105579 | 
| | 
| 
| 
| 
| 
| | instead of an IsAST bool.
llvm-svn: 105578 | 
| | 
| 
| 
| | llvm-svn: 105577 | 
| | 
| 
| 
| 
| 
| | create modules which have target data strings.
llvm-svn: 105576 | 
| | 
| 
| 
| | llvm-svn: 105575 | 
| | 
| 
| 
| 
| 
| | argument to BackendConsumer.
llvm-svn: 105574 | 
| | 
| 
| 
| 
| 
| 
| | type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778
llvm-svn: 105560 |