aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-rc/ResourceScriptParser.cpp
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2018-05-15 00:44:14 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2018-05-15 00:44:14 +0000
commitae7c9443559ac420a6f401b7a24eb2fcea8ba3e8 (patch)
tree0d39e1c0e8dc0762c0855ef2b693cbe2d3db40ba /llvm/tools/llvm-rc/ResourceScriptParser.cpp
parent980d93d0e0940fedb50906f7f31564fe24d2bded (diff)
downloadllvm-ae7c9443559ac420a6f401b7a24eb2fcea8ba3e8.zip
llvm-ae7c9443559ac420a6f401b7a24eb2fcea8ba3e8.tar.gz
llvm-ae7c9443559ac420a6f401b7a24eb2fcea8ba3e8.tar.bz2
[AST] Fix printing tag decl groups in decl contexts
For example, given: struct T1 { struct T2 *p0; }; -ast-print produced: struct T1 { struct T2; struct T2 *p0; }; Compiling that produces a warning that the first struct T2 declaration does not declare anything. Details: A tag decl group is one or more decls that share a type specifier that is a tag decl (that is, a struct/union/class/enum decl). Within functions, the parser builds such a tag decl group as part of a DeclStmt. However, in decl contexts, such as file scope or a member list, the parser does not group together the members of a tag decl group. Previously, detection of tag decl groups during printing was implemented but only if the tag decl was unnamed. Otherwise, as in the above example, the members of the group did not print together and so sometimes introduced warnings. This patch extends detection of tag decl groups in decl contexts to any tag decl that is recorded in the AST as not free-standing. Reviewed by: rsmith Differential Revision: https://reviews.llvm.org/D45465 llvm-svn: 332314
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptParser.cpp')
0 files changed, 0 insertions, 0 deletions