https://bugs.llvm.org/show_bug.cgi?id=32921

            Bug ID: 32921
           Summary: Undefined variables in class Status in
                    VirtualFileSystem.h
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: zec...@gmail.com
                CC: llvm-bugs@lists.llvm.org

After compiling clang trunk 301516 with gnu gcc -fsanitize=undefined option
I got many warnings at run time concerning undefined variables.

Many of them at tools/clang/include/clang/Basic/VirtualFileSystem.h:62

"Status() : Type(llvm::sys::fs::file_type::status_error) {}"

that I suggest to change into

"Status() : Type(llvm::sys::fs::file_type::status_error)
{Perms=llvm::sys::fs::no_perms;IsVFSMapped=false;}"

Thus explicitely initializing two local variables to safe values
and avoiding sanitizer warnings.

I propose to put this change in the trunk version.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to