the APFloat representing the parsed literal can represent the literal value
exactly. This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.
llvm-svn: 44423
converts a parsed literal into an APFloat. We are still performing a copy of the
string, which hopefully will be removed eventually for performance reasons. This
version now is at least safe.
Changed rounding in APFloat construction in NumericLiteralParser from rmTowardsZero
to rmNearestTiesToEven.
llvm-svn: 44422
a bug where the statement pretty-printer used iostreams but the AST printer
did not. This was an issue when dumping ASTs to something other than stderr.
Updated SerializationTest to use the new iostreams interface for the AST printer.
llvm-svn: 44417
(1) Parsed ASTs are pretty-printed to a text file.
(2) The ASTs are serialized to disk.
(3) The ASTs are deserialized from disk.
(4) The deserialized ASTs are pretty-printed to a text file.
(5) The two pretty-printed files are compared. If they are different, the test
fails.
llvm-svn: 44411
subdirectories mirroring where the test case file is located
For example, for the test case "Sema/stmt_exprs.c", instead of the files
"Output/stmt_exprs.c.out" and "Output/stmt_exprs.c.out.script" being created, the
files "Output/Sema/stmt_exprs.c.out" and "Output/Sema/stmt_exprs.c.out.script" are
created. This prevents any collisions from different test directories that have the
same file name for a test case, and also makes it clear where the test case was
drawn from.
llvm-svn: 44410
in this call:
Result.IntVal = APInt(80, 2, x);
What is x?
uint16_t x[8];
I deduce that the APInt constructor being used is this one:
APInt(uint32_t numBits, uint64_t val, bool isSigned = false);
rather than this one:
APInt(uint32_t numBits, uint32_t numWords, const uint64_t bigVal[]);
That doesn't seem right! This fix compiles but is otherwise completely
untested.
llvm-svn: 44400
which is now used (or subclasssed) by the ASTConsumers. This new class
stores a FILE* that is used for writing, instead of just hardwiring output
to stderr (it defaults to stderr if no FILE* is provided).
Modified CreateASTPrinter() to accept a FILE* for printing.
llvm-svn: 44377
diagnostic without a location. This produces:
simpleTest.c:2:18: error: initializer element is not constant
int *myPointer = &(myArray[2]);
^~~~~~~~~~~~~
instead of:
error: initializer element is not constant
llvm-svn: 44375
that have not yet been defined.
Removed used of grep and sed when parsing the results of "nm". This was
originally motivated because if the user has specified options to grep using
the environment variable GREP_OPTIONS this could break the script. Piping
through grep/sed/sort/uniq is also (to my understanding) not necessary, and
the equivalent operations can be done much faster in the Perl script.
Using a crude benchmark, these changes resulted in a 3x speedup in the
execution of GenLibDeps.pl.
llvm-svn: 44372