[LLVMbugs] [Bug 15095] New: Inconsistent Paren Locations for vector literal CompoundLiteralExpr compared to typical expected behavior

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 28 14:24:08 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15095

             Bug #: 15095
           Summary: Inconsistent Paren Locations for vector literal
                    CompoundLiteralExpr compared to typical expected
                    behavior
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: john at multicorewareinc.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9937
  --> http://llvm.org/bugs/attachment.cgi?id=9937
Proposed patch to resolve reported issue.

For a vector literal expression represented as a CompoundLiteralExpr, clang
reports that the source range of the generated CompoundLiteralExpr is the
source range of the vector "cast" operation marking the expression as a vector
literal.  This is inconsistent with the general notion of a
CompoundLiteralExpr's source range, which should be a superset of the source
ranges of all its children, enclosed in braces or parens.  

The attached proposed patch to SemaExpr.cpp and Sema.h results in source
location information for vector literals that is more consistent with the
typical meaning of a CompoundLiteralExpr's source location.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list