Index: lib/Parse/ParseStmt.cpp
===================================================================
--- lib/Parse/ParseStmt.cpp	(revision 176029)
+++ lib/Parse/ParseStmt.cpp	(working copy)
@@ -1032,6 +1032,22 @@
 
     // Pop the 'else' scope if needed.
     InnerScope.Exit();
+  } else if (Tok.is(tok::kw_if) && ThenStmt.isUsable()) {
+    SourceManager &SM = PP.getSourceManager();
+    SourceLocation Loc = Tok.getLocation();
+
+    Stmt *Then = ThenStmt.get();
+
+    if (isa<clang::CompoundStmt>(Then) &&  // Check for rbrace in ThenStmt.
+        !IfLoc.isMacroID() &&              // Ignore expanded macros.
+        (SM.getSpellingLineNumber(Loc) ==
+         SM.getSpellingLineNumber(PrevTokLocation))) {
+      Diag(Loc, diag::warn_missing_else);
+      Diag(Loc, diag::note_missing_else_separate_line)
+        << FixItHint::CreateInsertion(Loc, "else ")
+        << PrevTokLocation
+        << IfLoc;
+    }
   } else if (Tok.is(tok::code_completion)) {
     Actions.CodeCompleteAfterIf(getCurScope());
     cutOffParsing();
Index: test/Parser/warn-missing-else.c
===================================================================
--- test/Parser/warn-missing-else.c	(revision 0)
+++ test/Parser/warn-missing-else.c	(working copy)
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-else %s
+// RUN: %clang_cc1 -fsyntax-only -Wmissing-else -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+
+void test1(int a) {
+  if (a > 0) {
+  // expected-warning@+2 {{'else' might be missing}}
+  // expected-note@+1 {{change 'if' to 'else if' or put 'if' on a separate line to silence this warning}}
+  } if (a < 0) {
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:5-[[@LINE-1]]:5}:"else "
+  }
+}
+
+void test2(int a) {
+  if (a > 0) {
+  } 
+  if (a < 0) {
+  }
+}
+
+void test3(int a) {
+  if (a > 0)
+    a++; if (a < 0) {
+  }
+}
+
+// although looks weird, should not warn
+void test4(int a) {
+  if (a > 0) {
+  } else {
+  } if (a < 0) {
+  }
+}
+
+#define MACRO_IF(a) if (a) {}
+#define MACRO_BLOCK(a) { a; }
+
+// ignore macros
+void test5(int a) {
+  if (a > 0) {
+  } MACRO_IF(a < 0)
+
+  MACRO_IF(a > 0) if (a < 0) {
+  }
+
+  if (a > 0)
+  MACRO_BLOCK(--a) if (a < 0) {
+    ++a;
+  }
+}
+
+// might be not an issue, but looks very weird
+void test6(int a) {
+  // expected-warning@+2 {{'else' might be missing}}
+  // expected-note@+1 {{change 'if' to 'else if' or put 'if' on a separate line to silence this warning}}
+  if (a > 0) {} if (a < 0) {}
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:17-[[@LINE-1]]:17}:"else "
+}
+
+void test7(int a) {
+  if (a > 10) {
+  } else if (a > 0) {
+  // expected-warning@+2 {{'else' might be missing}}
+  // expected-note@+1 {{change 'if' to 'else if' or put 'if' on a separate line to silence this warning}}
+  } if (a > -10) {
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:5-[[@LINE-1]]:5}:"else "
+  }
+
+  if (a > 10) {
+  } else if (a > 0) {
+  }
+  if (a < 0) {
+  }
+}
+
+// A long chain.
+void test8(int a) {
+  if (a > -10) {
+  } else if (a > -5) {
+  } else if (a > 0) {
+  // expected-warning@+2 {{'else' might be missing}}
+  // expected-note@+1 {{change 'if' to 'else if' or put 'if' on a separate line to silence this warning}}
+  } if (a > 5) { 
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:5-[[@LINE-1]]:5}:"else "
+  } else if (a > 10) {
+  // expected-warning@+2 {{'else' might be missing}}
+  // expected-note@+1 {{change 'if' to 'else if' or put 'if' on a separate line to silence this warning}}
+  } if (a > 15) {
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:5-[[@LINE-1]]:5}:"else "
+  } else {
+  }
+}
+
+
Index: include/clang/Basic/DiagnosticParseKinds.td
===================================================================
--- include/clang/Basic/DiagnosticParseKinds.td	(revision 176029)
+++ include/clang/Basic/DiagnosticParseKinds.td	(working copy)
@@ -305,6 +305,12 @@
 def err_expected_case_before_expression: Error<
   "expected 'case' keyword before expression">;
 
+def warn_missing_else : Warning<
+  "'else' might be missing">,  InGroup<MissingElse>, DefaultIgnore;
+def note_missing_else_separate_line : Note<
+  "change 'if' to 'else if' or put 'if' on a separate line to silence "
+  "this warning">;
+
 // Declarations.
 def err_typename_requires_specqual : Error<
   "type name requires a specifier or qualifier">;
Index: include/clang/Basic/DiagnosticGroups.td
===================================================================
--- include/clang/Basic/DiagnosticGroups.td	(revision 176029)
+++ include/clang/Basic/DiagnosticGroups.td	(working copy)
@@ -121,6 +121,7 @@
 def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;
 def ShiftOpParentheses: DiagGroup<"shift-op-parentheses">;
 def DanglingElse: DiagGroup<"dangling-else">;
+def MissingElse : DiagGroup<"missing-else">;
 def DanglingField : DiagGroup<"dangling-field">;
 def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
 def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
