Index: include/clang/Lex/PPCallbacks.h
===================================================================
--- include/clang/Lex/PPCallbacks.h	(revision 141529)
+++ include/clang/Lex/PPCallbacks.h	(working copy)
@@ -159,6 +159,10 @@
   virtual void MacroUndefined(const Token &MacroNameTok, const MacroInfo *MI) {
   }
   
+  /// Defined - This hook is called whenever the 'defined' operator is seen.
+  virtual void Defined(const Token &MacroNameTok) {
+  }
+  
   /// SourceRangeSkipped - This hook is called when a source range is skipped.
   /// \param Range The SourceRange that was skipped. The range begins at the
   /// #if/#else directive and ends after the #endif/#else directive.
@@ -292,6 +296,11 @@
     Second->MacroUndefined(MacroNameTok, MI);
   }
 
+  virtual void Defined(const Token &MacroNameTok) {
+    First->Defined(MacroNameTok);
+    Second->Defined(MacroNameTok);
+  }
+
   virtual void SourceRangeSkipped(SourceRange Range) {
     First->SourceRangeSkipped(Range);
     Second->SourceRangeSkipped(Range);
Index: lib/Lex/PPExpressions.cpp
===================================================================
--- lib/Lex/PPExpressions.cpp	(revision 141529)
+++ lib/Lex/PPExpressions.cpp	(working copy)
@@ -117,6 +117,10 @@
     PP.markMacroAsUsed(Macro);
   }
 
+  // Invoke the 'defined' callback.
+  if (PPCallbacks *Callbacks = PP.getPPCallbacks())
+    Callbacks->Defined(PeekTok);
+
   // If we are in parens, ensure we have a trailing ).
   if (LParenLoc.isValid()) {
     // Consume identifier.
