[PATCH] D15373: Fix for bug 25786 - Assertion "Chunk.Kind == DeclaratorChunk::Function" failed with regparm attribute.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 14 05:35:24 PST 2016
aaron.ballman added a comment.
In http://reviews.llvm.org/D15373#315457, @a.makarov wrote:
> I've updated the patch. Please, re-review it again.
> About creating attributed type - I think we shouldn't create it if we ignored specified CC attribute. Ignoring specified CC attribute (and emitting the warning, of course) leads to substituting it by default; calling convention, substituted by default, is the same situation like there is no CC attribute specified for chosen function. Thus, from this point of view, we should not create AttributedType.
I tend to agree with @rnk on this -- it is a shame to lose that syntactic information in the AST representation (for instance, tools may wish to detect the presence of that attribute in the source to perform different analyses on the type). Even if it is semantically ignored, it is still something the user wrote. For instance, this means we cannot round-trip the user's source code through pretty printing, despite the code not being ill-formed.
Comment at: test/CodeGen/adding_defaulted_cc_attr_to_type.c:1
@@ +1,2 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -verify -emit-llvm -o - %s | FileCheck %s
Can you drop the svn props on the file? Our convention is to not rely on props, but instead save the file with UNIX line endings.
More information about the cfe-commits