CodeCompletionHandler.h revision f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9
1//===--- CodeCompletionHandler.h - Preprocessor code completion -*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines the CodeCompletionHandler interface, which provides 11// code-completion callbacks for the preprocessor. 12// 13//===----------------------------------------------------------------------===// 14#ifndef LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H 15#define LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H 16 17namespace clang { 18 19/// \brief Callback handler that receives notifications when performing code 20/// completion within the preprocessor. 21class CodeCompletionHandler { 22public: 23 virtual ~CodeCompletionHandler(); 24 25 /// \brief Callback invoked when performing code completion for a preprocessor 26 /// directive. 27 /// 28 /// This callback will be invoked when the preprocessor processes a '#' at the 29 /// start of a line, followed by the code-completion token. 30 /// 31 /// \param InConditional Whether we're inside a preprocessor conditional 32 /// already. 33 virtual void CodeCompleteDirective(bool InConditional) { } 34 35 /// \brief Callback invoked when performing code completion within a block of 36 /// code that was excluded due to preprocessor conditionals. 37 virtual void CodeCompleteInConditionalExclusion() { } 38}; 39 40} 41 42#endif // LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H 43