[LLVMbugs] [Bug 16676] New: Crash-on-invalid with a fragile combination of typo corrections and whitespace

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 22 17:28:22 PDT 2013


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

            Bug ID: 16676
           Summary: Crash-on-invalid with a fragile combination of typo
                    corrections and whitespace
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: matthewbg at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ cat test.cc
struct S { int i; };
struct T { S* get_s(); };
int f(S* s) {
  T t;
  return t.get_s
      .i;
}
$ clang -fsyntax-only test.cc
test.cc:5:12: error: reference to non-static member function must be called;
did you mean to call it with no arguments?
  return t.get_s
         ~~^~~~~
                ()
/usr/local/google/home/matthewbg/test.cc:6:7: error: member reference type 'S
*' is a pointer; maybe you meant to use '->'?
clang: llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp:973: void
highlightRange(const clang::CharSourceRange &, unsigned int, clang::FileID,
const <anonymous>::SourceColumnMap &, std::string &, const clang::SourceManager
&, const clang::LangOptions &): Assertion `StartColNo <= EndColNo && "Trying to
highlight whitespace??"' failed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130723/c8089659/attachment.html>


More information about the llvm-bugs mailing list