[PATCH] D53561: [clang] Fix a null pointer dereference.

2018-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345029: [clang] Fix a null pointer dereference. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D53561 Files: cfe/trunk/l

[PATCH] D53561: [clang] Fix a null pointer dereference.

2018-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 170608. kadircet added a comment. Herald added a subscriber: arphaman. - Add tests. Repository: rC Clang https://reviews.llvm.org/D53561 Files: lib/Sema/SemaCodeComplete.cpp test/Index/complete-switch.c Index: test/Index/complete-switch.c

[PATCH] D53561: [clang] Fix a null pointer dereference.

2018-10-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice! Can you construct an example and add a simple lit test? https://reviews.llvm.org/rL344133 is a recent similar change. Repository: rC Clang https://reviews.llvm.org/D53561 __

[PATCH] D53561: [clang] Fix a null pointer dereference.

2018-10-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ioeric, hokein. Herald added a subscriber: cfe-commits. Sometimes expression inside switch statement can be invalid, for example type might be incomplete. In those cases code were causing a null pointer dereference. This patch fi