[PATCH] D19973: [scan-build] fix warning emitted on LLVM X86 code base
Apelete Seketeli via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 07:34:17 PDT 2016
apelete created this revision.
apelete added a reviewer: nadav.
apelete added a subscriber: llvm-commits.
Fix logic error warnings of the type "called C++ object pointer is
null" emitted by Clang Static Analyzer on the following file:
- lib/Target/X86/AsmParser/X86AsmParser.cpp.
Signed-off-by: Apelete Seketeli <apelete at seketeli.net>
http://reviews.llvm.org/D19973
Files:
lib/Target/X86/AsmParser/X86AsmParser.cpp
Index: lib/Target/X86/AsmParser/X86AsmParser.cpp
===================================================================
--- lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -3002,6 +3002,7 @@
getStreamer().InitSections(false);
Section = getStreamer().getCurrentSection().first;
}
+ assert(Section && "must have section to emit alignment");
if (Section->UseCodeAlign())
getStreamer().EmitCodeAlignment(2, 0);
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19973.56284.patch
Type: text/x-patch
Size: 477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160505/78134f18/attachment.bin>
More information about the llvm-commits
mailing list