hanchenye-llvm-project/clang/unittests
Manuel Klimek 1a18c40468 Revamps structural error detection / handling.
Previously we'd only detect structural errors on the very first level.
This leads to incorrectly balanced braces not being discovered, and thus
incorrect indentation.

This change fixes the problem by:
- changing the parser to use an error state that can be detected
  anywhere inside the productions, for example if we get an eof on
  SOME_MACRO({ some block <eof>
- previously we'd never break lines when we discovered a structural
  error; now we break even in the case of a structural error if there
  are two unwrapped lines within the same line; thus,
  void f() { while (true) { g(); y(); } }
  will still be re-formatted, even if there's missing braces somewhere
  in the file
- still exclude macro definitions from generating structural error;
  macro definitions are inbalanced snippets

llvm-svn: 179379
2013-04-12 14:13:36 +00:00
..
AST Add an error to check that all program scope variables are in the constant address space in OpenCL. 2013-04-05 20:14:50 +00:00
ASTMatchers Adding new AST Matchers isVirtual and isOverride 2013-04-09 20:46:36 +00:00
Basic <rdar://problem/12368093> Extend module maps with a 'conflict' declaration, and warn when a newly-imported module conflicts with an already-imported module. 2013-03-20 21:10:35 +00:00
Format Revamps structural error detection / handling. 2013-04-12 14:13:36 +00:00
Frontend Nuke SetUpBuildDumpLog. 2013-01-20 01:58:28 +00:00
Lex <rdar://problem/12368093> Extend module maps with a 'conflict' declaration, and warn when a newly-imported module conflicts with an already-imported module. 2013-03-20 21:10:35 +00:00
Tooling CommandLineArgumentParser: handle single quotes. 2013-03-02 06:00:16 +00:00
CMakeLists.txt Initial version of formatting library. 2012-12-03 18:12:45 +00:00
Makefile Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user 2012-12-13 16:09:42 +00:00