| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.
--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.
FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.
Addresses rdar://8583824.
llvm-svn: 118203
|
|
|
|
|
|
|
|
| |
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.
llvm-svn: 117147
|
|
|
|
|
|
|
|
|
|
| |
This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.
-fmsc-version=<version> (defaults to VS2003 (1300))
llvm-svn: 116999
|
|
|
|
| |
llvm-svn: 116990
|
|
|
|
|
|
|
|
|
|
| |
unrolling enough loops to show that an invariant
doesn't hold. This fix is to increase the loop unrolling count to 4, which experiments show doesn't typically impact
analysis time. The real fix is to modify the IdempotentOperationsChecker to suppress warnings where an analysis point
could be preceded by a point where we gave up due to loop unrolling.
llvm-svn: 116769
|
|
|
|
|
|
| |
to CodeGenOption flags.
llvm-svn: 116530
|
|
|
|
|
|
|
|
|
|
| |
accompanied by a name
and emits an error if a declaration with this name is deserialized from PCH.
This is for testing, to make sure that we don't deserialize stuff needlessly.
llvm-svn: 116505
|
|
|
|
|
|
| |
print the PCH decls that got deserialized, for testing purposes.
llvm-svn: 116503
|
|
|
|
|
|
| |
libclang does not support out-of-process code completion.
llvm-svn: 116253
|
|
|
|
|
|
|
|
| |
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.
llvm-svn: 116250
|
|
|
|
|
|
| |
clarify that they are not modified, and to allow for string literals as arguments.
llvm-svn: 116200
|
|
|
|
| |
llvm-svn: 116020
|
|
|
|
|
|
| |
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.
llvm-svn: 115188
|
|
|
|
|
|
|
| |
-cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true,
-cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true.
llvm-svn: 115142
|
|
|
|
|
|
| |
simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.
llvm-svn: 114192
|
|
|
|
|
|
| |
statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.
llvm-svn: 113568
|
|
|
|
|
|
|
| |
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().
llvm-svn: 113505
|
|
|
|
|
|
| |
(original patch r112791 was reverted due to a bug).
llvm-svn: 112915
|
|
|
|
| |
llvm-svn: 112797
|
|
|
|
| |
llvm-svn: 112791
|
|
|
|
|
|
| |
before using them.
llvm-svn: 112468
|
|
|
|
|
|
|
| |
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.
llvm-svn: 111983
|
|
|
|
|
|
| |
-iwithsysroot flag should do that. This fixes rdar://8345942
llvm-svn: 111979
|
|
|
|
|
|
|
| |
Instead of implementing -isystem, I accidentally implemented this cousin. Next
up is to implement -isystem right.
llvm-svn: 111966
|
|
|
|
|
|
|
|
| |
duplication between the constant and non-constant paths in all of this.
Implement ARM ABI semantics for member pointer constants and conversion.
llvm-svn: 111772
|
|
|
|
|
|
| |
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!
llvm-svn: 111557
|
|
|
|
| |
llvm-svn: 111474
|
|
|
|
| |
llvm-svn: 111467
|
|
|
|
| |
llvm-svn: 111279
|
|
|
|
| |
llvm-svn: 111265
|
|
|
|
|
|
| |
contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.
llvm-svn: 111258
|
|
|
|
| |
llvm-svn: 111166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.
There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.
Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.
llvm-svn: 111093
|
|
|
|
|
|
| |
will apply all fixes even when there were other errors in the file.
llvm-svn: 111020
|
|
|
|
|
|
|
|
| |
a -cc1 option. The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable. Platforms with less ornery linkers can feel free to enable this.
llvm-svn: 110979
|
|
|
|
|
|
| |
linker in use.
llvm-svn: 110871
|
|
|
|
|
|
| |
of just ignoring it.
llvm-svn: 110525
|
|
|
|
|
|
|
|
|
| |
to a flag (-analyzer-check-idempotent-operations)
- Added IdempotentOperationChecker to experimental analyses for testing purposes
- Updated test cases to explictly call the checker
llvm-svn: 110482
|
|
|
|
|
|
| |
analysis) that doesn't prune CFG edges.
llvm-svn: 110087
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the usual consistency checks used to determine when a precompiled
header is incompatible with the translation unit it's being loaded
into.
Enable this option when loading a precompiled preamble, because the
preamble loader will be performing all of this checking itself. Enable
the preamble-based test now that it's working.
This option is also useful for debugging Clang's PCH
(<rdar://problem/7532213>).
llvm-svn: 109475
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reparsing an ASTUnit. When saving a preamble, create a buffer larger
than the actual file we're working with but fill everything from the
end of the preamble to the end of the file with spaces (so the lexer
will quickly skip them). When we load the file, create a buffer of the
same size, filling it with the file and then spaces. Then, instruct
the lexer to start lexing after the preamble, therefore continuing the
parse from the spot where the preamble left off.
It's now possible to perform a simple preamble build + parse (+
reparse) with ASTUnit. However, one has to disable a bunch of checking
in the PCH reader to do so. That part isn't committed; it will likely
be handled with some other kind of flag (e.g., -fno-validate-pch).
As part of this, fix some issues with null termination of the memory
buffers created for the preamble; we were trying to explicitly
NULL-terminate them, even though they were also getting implicitly
NULL terminated, leading to excess warnings about NULL characters in
source files.
llvm-svn: 109445
|
|
|
|
|
|
|
| |
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.
llvm-svn: 109392
|
|
|
|
|
|
|
|
|
| |
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.
llvm-svn: 108913
|
|
|
|
|
|
|
|
|
|
| |
it into the default path-sensitive analysis options.
- Added checks for static local variables, self assigned parameters, and truncating/extending self assignments
- Removed command line option (now default with --analyze)
- Updated test cases to pass with idempotent operation warnings
llvm-svn: 108550
|
|
|
|
|
|
|
| |
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.
llvm-svn: 107992
|
|
|
|
|
|
| |
the PCH writer if it is not set, preventing creation of chained PCH files. Since the reader is so far unused, effectively no functionality change.
llvm-svn: 107936
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.
Example:
{
int a = 1;
int b = 5;
int c = b / a; // a is 1 on all paths
}
- New IdempotentOperationChecker class
- Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
- Minor refactoring of SVal to allow checking for any integer
- Added command line option for check
- Added basic test cases
llvm-svn: 107706
|
|
|
|
| |
llvm-svn: 107367
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of this, pull together trapv handling into the same enum.
This also add support for NSW multiplies.
This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).
llvm-svn: 106956
|
|
|
|
|
|
| |
Elhage!
llvm-svn: 106507
|